date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,418,997,015,000 |
I have two IP address running on Postfix and each IP has own domain. In short i want to isolate domain so outside folks think it is running on own IP and fully isolated even PTR also
But in postfix it not handling myhostname option IP specifically. it always use default value set in mail.cf file
I have tried to set -o... |
-o myhostname=abc not much important. To affect HELO You must override -o smtp_helo_name=abc
Values configured in main.cf has complex inheritance, but it work only on main.cf loading. When You override some parameters latter, You need override all necessary.
For now, I dont know how to force postfix to send mail from ... | postfix multidomain myhostname configuration |
1,418,997,015,000 |
I have a problem with Mutt at the moment. I have a 4GL routine that creates some quite large output files and I want them to go in a single mail ideally. The total of these files is 21889119 (sum of zip files in Unix) and the message_size_limit in our Postfix config file is 25600000 so would expect these files to be s... |
The binary attachments need to be encoded as ascii and that typically expands them with 20-25%.
You will have that expansion problem with any mailer, commandline or not. You can easily test that by using thunderbird and sending the file through Google (or your provider).
| Mutt overheads or missing switches |
1,418,997,015,000 |
Thunderbird cannot search PGP-encrypted emails. Hence, I was considering copying all my emails from IMAP to local storage, then decrypting them all locally, so that they are searchable. Is this possible?
Thunderbird stores email folders as a single mbox file. I attempted gpg -d mbox_file, but this only decrypted a sin... |
As of 2020 (sorry, I've no idea when this function was added) enigmail has a "decrypt to folder" option. (At the very bottom of the context menu.)
And you can select all messages in a folder, then use it to decrypt all messages in bulk.
(My search found your question as I'm wanting to do the opposite: take a directory... | How can I PGP decrypt an entire mbox? |
1,418,997,015,000 |
I operate a Linux system where I give out free Linux shell accounts to people for educational purposes. Unfortunately, while doing so it's expected to meet abusive users who will keep sending spam emails to other servers such as Google, Zoho, etc and hence will get the IP of the server blocked.
What I would like to d... |
Use a transport map:
Find or add the following line in your main.cf (alter the file location to fit your CentOS setup):
transport_maps = hash:/etc/postfix/transport
Edit the transport map file above to:
localhost :
<your FQDN> :
* error: Outgoing mail from this system has been disabled.
localhost and your FQD... | Allowing outgoing emails that will be delivered to localhost only |
1,418,997,015,000 |
Is there a way to horizontally center emails when reading them in a larger terminal using mutt? I'm not interested in centered justification of the text in the email, but I am interested in forcing the block of text to be left-aligned, 78 characters wide and centered in a 120 character terminal.
For example, right no... |
Solutions within Mutt
I'm not finding much in the way of how to do this. Mutt has *_format variables, I suspect you could use those to control pager_format and index_format, for example:
set index_format="%4C %Z %[!%y-%m%d] %-18.18F (%4c) %s"
set pager_format="%S [%C] %n (%l) %s"
But I don't think this will give y... | Center Mutt pager horizontally |
1,418,997,015,000 |
I have a very simple procmail process that takes an inbound email and redirects it to a script:
LOGFILE=/home/foo/procmail-log
VERBOSE=yes
MAILDIR=/var/spool/mail/foo
DEFAULT=/var/spool/mail/foo
SHELL=/bin/sh
:0
! `/home/foo/scripts/blah/blah.sh`
The shell script has a condition that greps a file for a sender's ema... |
Procmail makes great efforts to assure that mail is not lost even if delivery fails. According to man procmail, email will be bounced back to sender as a last resort:
ORGMAIL Usually the system mailbox (ORiGinal MAIL‐
box). If, for some obscure reason (like
`filesystem full... | Why does procmail send a copy of an inbound message to sender if it encounters an exit code? |
1,418,997,015,000 |
I have installed Postfix, I can send mails between local users as expected, but I would try to limit the access of a particular user to the server. I edited the /etc/postfix/access file in this way:
[email protected] REJECT
where example.com is $mydomain. I did also a postmap access to generate the validate file. Str... |
I found finally the correct sintax. If you want to just block a user, you have to edit the main.cf file in this way:
smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/access
and in the access file:
user@ REJECT
[email protected] REJECT #this will REJECT only if sender is from s... | Why access file is being ignored by Postfix? |
1,418,997,015,000 |
I get new-mail notifications when running bash interactively on Linux console but I don't get them on xterm or konsole.
The environment variable MAIL is set to /var/mail/USER upon logging in on the console but it's empty on xterm and konsole.
Also, MAIL is not mentioned in any of .bashrc, .profile, /etc/bash.bashrc, /... |
The program login sets the MAIL environmental variable when you login to a Linux virtual console.
From the login(1) manpage:
The value for $HOME, $USER, $SHELL, $PATH, $LOGNAME, and $MAIL are set according to the appropriate fields in the password entry.
login is the program used to start a session when you logi... | Why is MAIL unset in graphical environments? |
1,418,997,015,000 |
How do I extract attachments from mails arriving at my postfix mailbox and preferably send the content of the attachment to another email account? I am interested in being able to acquire/read the content of the attachment on ubuntu terminal.
|
Install procmail if not already installed. In your postfix configuration ( /etc/postfix/main.cf ) make sure you have a line:
mailbox_command = procmail -a "$EXTENSION"
in your ~/.procmailrc insert the following (you will need a different matching pattern):
:0
* ^Subject:.*some_text_to_match
| /usr/local/bin/your_proc... | extracting attachments from mail that is coming to my postfix inbox |
1,418,997,015,000 |
I administer a home server, and sometimes when I'm out, I need to execute some simple commands on the server. 3G + SSH is not an option because it's too expensive from my phone (here in Argentina). It is easier to send an SMS to my mail account.
I want to fetch the mails I send to my server, and process the text surro... |
I'd recommend you install procmail or some other mail processor. You can configure it so everything from you, with a subject line of a certain magical password that only you know will pass the contents to a script (which you could then execute).
But... you're opening a huge security hole so it's unwise to do this as... | How to fetch and process mail in order to execute commands? |
1,418,997,015,000 |
I have recently started using mutt to access my email account via IMAP.
My IMAP connection settings are as follows:
set ssl_starttls = yes
set ssl_force_tls = yes
set imap_user = "[email protected]"
set smtp_url = "smtp://[email protected]@smtp.domain.tld:[port]/"
set folder = "imaps://imap.domain.tld:[port]"
set host... |
The authentication type PLAIN means there is no specific security protocol for the password itself on the IMAP protocol layer.
But the authentication still happens within the TLS1.2 connection, so unless TLS negotiation has accepted a NULL encryption, the whole connection, including the transmission of the password is... | IMAP authentication by Mutt: Is Mutt transmitting password in plaintext? |
1,418,997,015,000 |
When using mutt command:
mutt -e "set content_type=text/plain" -e "my_hdr From:[email protected]" -s "取样更多 サンプル 样品 text" -c "取样更多" -a "サンプル取样更多"
Now this mail will not be sent obviously, but the point is when I see the mail using sudo postsuper -q ID, subject of the mail is garbled, i.e.:
*** ENVELOPE RECORDS defer... |
The subject is not garbled. It's encoded in the MIME encoded-word format. There isn't a single standard encoding for email. The Content-Type header indicates the encoding of the body, but it doesn't apply to headers such as Subject. If a header contains non-ASCII characters, they need to be encoded in a format that in... | Mutt subject is garbled when using japanese/chinese characters |
1,418,997,015,000 |
All I can find online refers to a setup where you own the mailserver. This is not the case here.
I have a headless (so thunderbird is a no go) machine (ARM) on which I need to setup an automated mail reply client. The mail service I am using does not have such a feature. I can access my mails using the IMAP protocol, ... |
I have now solved this the easy (yet a bit resource intensive) way, using VNC and thunderbird.
Here's a step by step guide which was performed on a headless debian machine:
1. Install a graphical environment
I wanted the absolute most lightweight system there is. xfce4 shocked me with its many dependencies (total disk... | CLI E-Mail client with auto reply? |
1,418,997,015,000 |
Fail2ban is doing it's job and fail2ban-client status is showing me they're all working fine and offending addresses get blocked.
When an address is blocked I like to receive a mail. That's working for all jails except for one. Why?
Here are the relevant parts of /etc/fail2ban/jail.local:
# My own domain is here, not ... |
I had the same problem. I have 2 jails going, the ssh and recidive. The ssh jail was sending me emails perfectly, but nothing from recidive. I am running:
Fail2Ban v0.8.13
My relevant global config is identical to what you posted:
banaction = iptables-multiport
mta = sendmail
action_mwl = %(banaction)s[name=%(... | Why does Fail2ban not send mail for one particular jail? |
1,418,997,015,000 |
I am trying to familiarize myself with crontab. I know that it is supposed to send an email containing the output of jobs to the user that scheduled them however, I can see in the syslog that the address crontab is sending emails to is not a "local" one (as if I were to type mail -s "email here" username) but an exte... |
man 5 crontab
If MAILTO is defined (and non-empty), mail is sent
to the user so named. MAILTO may also be used to direct mail to multi‐
ple recipients by separating recipient users with a comma.
| Where does crontab get the email address of the user it emails / where are user email addresses set? |
1,418,997,015,000 |
Can mutt send mail from command line without command line parameters, with subject, cc, bcc, reply-to, in-reply-to all defined inside mail.txt file with body of the message too (the same file format like mutt opens to me when i press m-send mail, or r-reply to mail).
... So that I can:
press 'r' on received mail, pre... |
If you are using sendmail or postfix to deliver the mail, you can use
sendmail -t <~/preparedmail.tx
and it will extract the destination recipient(s) from any To: Cc: or Bcc: header lines in the file (upto the first blank line) and send the file as mail.
For people having configured a tool like mutt to send mail di... | mutt send mail from command line, with headers inside text file |
1,425,123,351,000 |
I run a debian 7 system and I run postfix as smtp server. I can send mail from postfix to outside (even though it gets to spam folders by google) but when I try to send a mail from, lets say my google account to my server I get error.
Lets say my ip is 77.77.77.77, my hostname machine.host.org and the dns: example.ru
... |
In main.cf I changed the line
mydestination = $myhostname localhost.$mydomain $mydomain
into the line
mydestination = $myhostname localhost.$mydomain $mydomain example.ru
Now everything seem to work fine. However, if someone knows what the actual cause of the problem is, please enlighten us!
| Relay access error when I try to send mail from outside to postfix |
1,425,123,351,000 |
I have some (~3) Debian boxes, and I want to post system mail to my non-local mailbox. But I have a problem with configuring exim4. Also I don't like so much exim4's config. Too different, and also with my last try I had to store the password unencrypted.
I have 2 questions:
How do I configure outgoing mail with GMai... |
Do you need to use exim4?
I recommend using postfix. This guide helps you do this with encrypted password
http://www.marksanborn.net/linux/send-mail-postfix-through-gmails-smtp-on-a-ubuntu-lts-server/
| How to send non-local mail, with GMail(GApps) SMTP? |
1,425,123,351,000 |
I'm running Fedora 13 Linux, and sending mail to myself using mutt, and I can't seem to get procmail to run. Below is what my .procmailrc, ~/Procmail/rc.testing, and .forward files all look like. As you can see, they are very simple.
.procmailrc
HOME=/home/cory
SHELL=/bin/bash
PMDIR=$HOME/Procmail
LOGFILE=$PMDIR/pml... |
The postfix command exists in /usr/sbin/ if Postfix is installed, and regular users do not have the /sbin/ directories in their PATH variable by default. The best way to check is by asking your package manager - in this case, by typing rpm -q postfix.
If it is installed, check the value of the mailbox_command paramete... | Why is procmail not being run? |
1,425,123,351,000 |
Does anybody on this planet know what the equivalent GNU mailutils command to the following looks like?
Is this even possible without a local MTA with mailutils?
Using s-nail it works as intended.
s-nail -s "$subject" -S $smtp_server -r $from_user $to <<<$message
according to the GNU mailutils manual
I tried:
mail --... |
got it.
on default mailutils mailer url (smtp://$smtp_server) uses startls.
Found it using verbose mode:
mail --subject "$subject" \
--exec "set sendmail=smtp://$smtp_server" \
--exec 'set verbose' \
--append "From:$from_user" \
$to <<<$message
mail: S: 220 xxx ESMTP
mail: C: EHLO xxx
mail: S: 250-xxx
mail: S... | How can I make GNU mailutils to use an external SMTP server? |
1,425,123,351,000 |
I run Courier IMAP with STARTTLS support. Currently, IMAP_TLS_REQUIRED is set to 0 (false), meaning that a client is fully permitted to use a clear-text login on an unsecured channel. Setting it to 1 (true) is not an option, as it breaks SquirrelMail (which can't use STARTTLS); however, I know for a fact that only cer... |
I don't think there would be a way to set IMAP_TLS_REQUIRED to true and use clients that don't support STARTTLS.
However, you have other possibilities if you full control of the network. For the SquirrelMail connections, you could use one firewall rule per IP address so at least only those people can connect to that s... | Courier IMAP, TLS, and trusted IPs |
1,425,123,351,000 |
I have following macro defined in my muttrc:
macro index s ":set confirmappend=no delete=yes auto_tag=yes\n\
<save-message>=archive\n<sync-mailbox>:set delete=ask-yes\n"
When I press s on a message, it will immediately be moved into my archive folder.
I would like to modify my macro, so that I will be asked for... |
Remove the \n from after the folder name so the command you are looking for is
macro index s ":set confirmappend=no delete=yes auto_tag=yes\n\
<save-message>=archive<sync-mailbox>:set delete=ask-yes\n"
| mutt: ask for confirmation before moving message to archive |
1,425,123,351,000 |
Basically, what I did:
Copied vmail folder to my local machine.
Reinstalled my VPS.
Installed iRedMail again.
Created same users on the same domain.
Question is - can I somehow copy over my old vmail folder in new one to import the old emails ?
Ubuntu 12.04, iRedMail 0.8.5 on postgresql. Previous installation was on... |
After consulting with iRedMail developers, copying over old vmail to new worked.
| Is it possible to import vmail folder from old iRedMail to new iRedMail installation? |
1,425,123,351,000 |
While setting up a new Postfix installation on a Mageia 3 Linux system, I came upon a few entries in the default /etc/postfix/aliases file that I do not know the background of:
# Common aliases for system accounts.
...
foo: root
falken: root
# traps to catch security attacks
...
moof: roo... |
falken is most likely a reference to the incredibly crappy 1983 movie War Games. I'll probably get voted down for saying that because a lot of people like that movie, but it was just dumb. Worse, it set the standard for how hacker movies were supposed to look. OTOH I couldn't stand the movie back then...but i'd pro... | Unknown entries in the default /etc/postfix/aliases file |
1,425,123,351,000 |
I'm playing around with various bits of an email solution, including notmuch and alot. I write my emails in vim and I'd like to have tab completion of email addresses while writing email. Is there a general plugin that would do something like this for me?
Ideally it would have a variable for what command to run and ... |
You can write your own custom insert-mode completion, and :imap that for easy access. There's an example in the help at :help E840 that shows the boilerplate; you just need to implement the email address query, probably either with system() or readfile().
| Autocompletion of email addresses in vim |
1,425,123,351,000 |
I'm using neomutt (an updated fork of mutt) as my CLI MUA (read: mail reading software in the terminal) and have all my messages synced offline using isync/mbsync and stored in the maildir-format on my Debian Stable system.
Sometimes I want to reply to a message and attach another email (e.g. as a reference). This ca... |
I just stumbled onto a solution: before sending the email, instead of pressing a to attach a file you can use A to select a mail folder, then using t to tag one (or multiple) messages and then attach the selected messages using Return.
| Display name and/or path of currently viewed email in mutt/neomutt |
1,425,123,351,000 |
I have setup a postfix relay docker container which is binding to port 25. I want to be able to use the mail command from the host CLI, but every time I install mailutils via apt it installs postfix as well.
How can I install JUST mailutils so I can access the mail command without installing postfix?
|
apt update
apt purge postfix mailutils -y
apt autoremove -y
rm /etc/postfix/ -R
reboot
apt install mailutils sendmail -y
apt purge postfix -y
apt autoremove -y
systemctl stop sendmail
systemctl disable sendmail
reboot
| Install Mail or Mailutils without postfix |
1,425,123,351,000 |
I installed Bugzilla on my CentOS 7 web server VPS. The install went smoothly, however when I went to set up email, I received the following error:
Can't locate object method "quit" via package "Net::SMTP::SSL" at Bugzilla/Config/Common.pm line 365.
For help, please send mail to the webmaster (********), giving this ... |
Mr. Schoning's answer is not wrong and did lead me to the solution. Basically, for the specific error I just did not see (understand more than likely) that very last response in the following link, where the author said that he had to run the following command. I executed the command and presto, instant success with e... | Bugzilla error: Can't locate object method quit via package "Net::SMTP::SSL" line 365 |
1,425,123,351,000 |
I'm trying to setup mailx to use my Gmail account. I've found a configuration that can send mail successfully but it requires me to store my email password in a configuration file in my home directory. I would like to be prompted for the password every time rather than storing it.
I've tried leaving out the smtp-auth... |
Which version of mailx are you using?
heirloom-mailx 12.5 on Ubuntu 14.04 prompts me for the password every time if there's no smtp-auth-password setting in ~/.mailrc. This feature was added in 12.0 in March 2006 according to ChangeLog.
| Using mailx without storing a password |
1,425,123,351,000 |
Every day we receive an e-mail from e.g. [email protected] with an attachment, the filename is e.g. report.xlsx
How can I save the file with the received date? e.g. 20180131_report.xlsx and how can I filter on the subject or the sender?
My ~/.procmailrc:
:0
*^content-Type:
{
:fw
| ripmime --overwrite --no-name... |
If your Procmail or the receiving MTA is configured to put in a From_ line before the message proper, this pseudo-header generally already contains the date. You'll need to parse it, which is a drag, so unless this is a system where you really need to optimize for perfomance (hundreds of matches per second on this con... | procmail save attachment with received date in filename |
1,475,608,012,000 |
I have successfully installed Postfix/Dovecot with virtual domains and TLS support like this article describes -
https://geekpeek.net/postfix-with-dovecot/ ...
But faced with the problem. I can send emails only to people in my domain zone (blabla, as example). It means that I can send email from [email protected] to [... |
As @alexkowalski mentioned, the problem that there was a short parameter (-o) in master.cf file not in the `main.cf file.
Because -o options in master.cf can override the options written in main.cf on a per-service basis, the smtpd_recipient_restrictions param value were being taken from the master.cf file.
Notice the... | Postfix: Recipient address rejected from another domain zones |
1,475,608,012,000 |
I am currently using wall to show a message on a remote machine when an activity is started and finished.
But this is intrusive, as it will write across an editor they might have open etc.
What I like is the "you have unread mail message" that shows up on the next line if the user presses return on the terminal.
What ... |
This line is printed by the shell. Different shells implement looking for mail in slightly different ways, but unless can count on people to configure their shells to your liking (and possibly pick a different shell), you need to send them mail.
Good shells designed for interactive use have a way to run arbitrary comm... | How to send a prompt to a remote machine like the "you have mail", ie not using wall |
1,475,608,012,000 |
I got a mailbox-file ("Mboxrd") created by getmail, and I'd like to "process" it by sorting mail from various (groups of) senders, and move them to separate mailbox-files (I guess 3-5 for now). Ideally, the mail messages thus moved, should be deleted from the original mailbox-file.
I most likely would want to classif... |
The formail -s method is documented with a demo script in the procmail man page; look for this phrase:
Procmail can also be invoked to postprocess an already filled system mailbox.
You would also find this in http://www.iki.fi/era/procmail/mini-faq.html#split
If your mailbox is not a Berkeley mbox single file, ch... | Processing/sorting mail from a mailbox-file? |
1,475,608,012,000 |
I'm using alexkowalski script from Email using shell script
MAILADDR=([email protected], [email protected], [email protected])
for i in "${MAILADDR[@]}"
do
echo "Mail test..." | mail -s "Mail test subject..." $i
done
My question is how to read MAILADDR array from an external flat file?
And how to ins... |
If the "external flat file" from which the email addresses are taken from doesn't look too funny (is well formatted), you could use something like that :
mail -s "My subject" $(cat /this/is/the/external/flat/file.txt) < /home/user/information-for-any-user.txt
| Email using shell script using email address from external flat file |
1,475,608,012,000 |
I'm using the ssmtp package to send e-mail via g-mail. Everything is working fine with it - the only strange thing is that if I send mail via the command line, the "to field" is funky.
ssmtp [email protected] < message.txt
Basically the "to" field will just say "undisclosed recipients"
I read that you can set headers... |
This situation comes from a misunderstanding of what ssmtp is doing. There's a very important difference between the message envelope (which mail servers use for routing mail) and the message body (which is displayed in your e-mail client). Both may have To and From, and they may be different from each other. This is ... | Can I make SSMTP to automatically set the "To:" header? |
1,475,608,012,000 |
How can I convert (or open) .ost file (Microsoft Outlook email folder) on linux ?
Ideally, I would like to read it with Mutt. But mutt does not seem to understand this format. Therefore I would like to convert it into something readable such as mbox or mdir format.
Are there such conversion tools on linux ?
|
There are a few tools which help with interoperability with Outlook files:
libpff, which includes a pffexport program which can extract data from OST (and other) files;
Evolution has a PST import plugin which can handle OST files;
libpst, which can convert PST files to mbox files, but I don’t know whether it can hand... | how to open/convert .ost file (Microsoft Outlook email folder) on linux |
1,475,608,012,000 |
I'm running FreeBSD 11.0-RELEASE.
On default cron is using /usr/lib/sendmail to send user emails. How can I tell/set cron to use /bin/mail instead?
FreeBSD is using the cron version from Paul Vixie, so the -m option sets the email receiver not what mailer to use.
I downloaded the FreeBSD source code and tried the comm... |
cron by default uses the value of the systemwide _PATH_SENDMAIL macro as the expansion of MAILCMD, the command to use to send messages generated by jobs. In order to use a different mail program, you need to modify the Makefile to define appropriate values for the MAILCMD and MAILARGS macros. The Makefile in the sourc... | Change cron default sendmail to mail |
1,475,608,012,000 |
I just set up a VPS with Debian 7 x64, and removed Sendmail along with some other programs. When it removed Sendmail, it also installed Exim. When I removed Exim, it installed xmail.
Is there any reason why it seems to require a mail program?
I used apt-get remove --purge sendmail* exim* to remove them
|
One of your installed packages depends on installed MTA. This is most likely cron. You can view why a package (or meta package) is installed with aptitude:
aptitude why mail-transport-agent
| Why does uninstalling sendmail install exim, and uninstalling exim installs xmail? |
1,475,608,012,000 |
Suppose I run -
mail goldfish
There is no such account on the system and no such aliases defined, where would the mail go?
How do I see a list of such mails?
|
The email would be returned to the sender as undeliverable due to lack of a destination address by the mail daemon on the destination server.
| Where do uncaught local emails go? |
1,475,608,012,000 |
Last week my email provider (mout.web.de) got listed on spamcop. So I cannot send emails to recipients whose mailserver uses spamcop. An obvious solotion, which popped up in the forums, is to switch to another (paid) email provider.
Since I have a local mailserver (exim) running anyways, I wonder whether I can set it ... |
In general this is possible, that's what email providers do.
You surely need your own domain.
Many ISPs have blocks in place so you're forced to go over your ISPs server.
Even if your ISP does not block port 25, mail from your IP range will very likely be marked as spam if you run it from a home connection.
Email is ... | Is it possible to run a private mailserver? |
1,475,608,012,000 |
Let's say, we have multiple mail servers in DNS records. If someone is sending a mail, the outgoing mail server will check the MX and contact the first server with the lowest cost.
If this server doesn't have the requested mail address, what happens then? Does the outgoing mailserver send the message to the second mai... |
SMTP and ESMTP (the underlying protocols) that handle mail delivery have extensive RFCs (the original being RFC821, and more modern update RFC2821 and a Internet standards track protocol in RFC5321).
How mail servers deal with errors during delivery varies from mail server to mail server. Adding to the complication is... | Question about MX records and mail delivery? |
1,475,608,012,000 |
I'm setting up a Debian server, and one of the things I need on it is an MTA. I don't want to use something like Exim or Postfix because I want something that ties in SMTP, POP3, and IMAP all in one (a la Microsoft Exchange). Most MTAs also seem to be hellishly difficult to configure. Try and read the Exim document... |
One of the few suites I've found that actually bundles this functionality into one and has a mostly graphical interface is Citadel. It's not perfect but it does somewhat fit the bill.
| Recommendations for good MTA / groupware solutions? |
1,475,608,012,000 |
I've got some large mailboxes and using Thunderbird, that means that I have several mbox files. These single files contain all e-mails in a particular folder. Now, I would like to get some data on the senders in a particular folder. My ideal statistic would be to get all unique senders, and the number of times their e... |
First, we need to reliably get the From header, which can be done with a restrictive grep regular expression.
% grep --no-filename --ignore-case '^From:' test.eml
From: [email protected]
Next we need to count the number of occurrences, which can be done with uniq -c (which requires a sorted list).
% grep --no-filenam... | Creating a list of unique senders from Thunderbird mail files through the command-line |
1,475,608,012,000 |
When i send email it sleep in my queue list. How can i send them out? (Fedora 15 distro).
# mailq
/var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
pBMNMDA1009288* 2100 Fri Dec 23 00:22 <apache@example>
<[email protected]>
pB... |
Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue and are marked as “Deferred: Connection timed out”. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command
sendmail -q -v
does not r... | How to send the email which is sleeping in my queue list? |
1,475,608,012,000 |
I'm developing a Thunderbird extension and I would like to setup a fake POP3 account to play with. What's the easiest way to setup a local POP3 server? It doesn't need to be particularly secure/robust, as it's meant only for local testing purposes.
|
Dovecot or Courier is probably your best bet.
http://wiki2.dovecot.org/POP3Server
http://www.courier-mta.org/install.html#pop3
| How to setup a local POP3 server? |
1,475,608,012,000 |
Cannot open an .mbox file with mutt
I want to open a 10GB .mbox file that I downloaded from my gmail account. When I use the command
neomutt -f 10GB_mboxfile.mbox
neomutt takes 10-20 seconds to open and when finally opened, there is no file listed in the the application. I have the following dummy .mbox (which I modi... |
It looks like neomutt doesn't like those timezone offsets in the From_ lines.
After:
sed -Ei 's/^(From .*) [-+][0-9]{4}/\1/' file.mbox
To remove them, it seems to be happy.
RFC4155 which specifies the mbox format says the timestamp should be UTC and in ctime() format, but acknowledges that in practice many applicatio... | Cannot open an .mbox file with neomutt (although it works with mutt) |
1,475,608,012,000 |
So I have an ancient archive of emails and I want to combine them into one big happy text file, can that be done? I notice when I view an email and cut and paste the content I get exactly what I want -- all the formatting is gone and I have a readable text file, all the meta data is gone along with all the HTML stuff... |
A scripted solution using:
formail (comes with procmail) to convert the emails to mailbox format
mutt to decode the mime stuff
elinks to convert HTML to text for those emails that don't have a text/plain alternative
zsh to orchestrate the lot and find the eml files in the current working directory and below.
#! /bin... | export/convert emails (.eml files) to plain text |
1,475,608,012,000 |
I executed the "mutt" command and it only showed me the inbox mails.
How should I view the sent emails? If I want to send a new mail against the first delivered mail, how should I do it?
I added set record=+outbox in the .muttrc file but it didn't work.
Thanks in advance.
|
Option 1: If your sent message folder is "outbox" (I assume you are using Maildir format for mail, so actual path is ~/Maildir/outbox), then you can start mutt with the command:
mutt -f ~/Maildir/outbox
or
mutt -f =outbox
(= is a shortcut used by mutt to indicate a subfolder of your Maildir)
Option 2: When viewing i... | How to view the sent mails in Mutt? |
1,475,608,012,000 |
I need to send myself a database backup from a remote docker container running Ubuntu. I ssh into the container and run:
uuencode dbexport.pgsql | mail -s "DB" [email protected]
It seems to hang forever so I run only the first part:
uuencode dbexport.pgsql
Which also seems to hang forever. Any suggestions to debug t... |
The command to uuencode a file should be:
uuencode dbexport.pgsql dbexport.pgsql
where the 1st name is the actual filename, and the 2nd the destination name for a possible restore in a different file.
So the correct way seems more like:
uuencode dbexport.pgsql dbexport.pgsql | mail -s "DB" [email protected]
I actua... | uuencode hangs? |
1,475,608,012,000 |
I have to move my Alpine account/mail/address book from an old pc to a newer one. I'm searching through the documentation and can't find useful informations about this.
As Alpine is installed to the second pc, copying the /home/old_username/mail directory of the old pc over the /home/new_username/mail directory of th... |
There are 3 files and a directory that I'm aware of, that you will need to copy.
The file ~/.pinerc. This is the Alpine config file.
The file ~/.addressbook. This is the Alpine addressbook.
The file /var/spool/mail/username. This is the inbox for user username. NOTE: apparently the "real" location is now /var/mail, a... | How to move Alpine mail on a different machine on Ubuntu? |
1,475,608,012,000 |
I'm currently struggling against a tenacious problem while setting up client certificate authentication for our mailservers via an NginX reverse proxy.
The setup seems to be working in most parts without the client certificates. But when I enable the checking of those and run a test with openssl s_client I allways get... |
Problem solved.
I'll post the reasons and the solution for the slight possibility that it might help someone else:
The first error (verify error:num=2:unable to get issuer certificate) resulted from the form of the -CAfile used on the client side. It was in x509 PEM format and contained a chain of the IntermediateCA'... | NginX client cert authentication fails with "unable to get issuer certificate" |
1,475,608,012,000 |
I sent an e-mail message from machine named syslog-server with command mail -s "syslog test" [email protected] <<< "test". The mail message was not delivered to receiver and following messages were logged to syslog-server log file:
Mar 11 13:16:06 syslog-server sendmail[30925]: u2BBG6mY030925: from=root, size=223, cla... |
Log entries sets 1,2,3 are chained based on queueid.
Log entries set 4 is chained based on sendmail process id (pid).
Message is successfully passed to local main sendmail daemon at 127.0.0.1:25
QID=u2BBG6mY030925 (QUID_at_127.0.0.1=u2BBG6tO030931)
Mar 11 13:16:06 syslog-server sendmail[30925]: u2BBG6mY030925: from... | understand sendmail log messages |
1,475,608,012,000 |
I am trying to migrate a number of user mail accounts from dovecot 1.0.7 on a centos 5.11 server to dovecot 2.1.7 on a debian 7 server
Foolishly I thought I could simply replicate the Maildirs from one server to the other using rsync, change the dns and all would be fine.
Sadly that did not work.
While the process di... |
I have solved the issue.
I have been meaning to do this move for a few months. in that time I have been rsyncing all users folders to the new server.
I forgot to add the --delete command to the rsync command thus old email messages were accumulating on the destination (new) server even after the user had deleted them... | Migrate mail from dovecot on centos to dovecot on debian |
1,475,608,012,000 |
I'm trying to forward the emails from my Debian server to my usual email address. I'm probably missing something important, as I can't find a good solution online looking for the following error message:
dnslookup defer (-1): host lookup did not complete
I found this answer but it did not help me:
https://serverfault... |
The standard dnslookup router of exim uses an algorithm to decide how to resolve an email address (this is detailed in the Exim manual on the chapter detailing dnslookup router). Looking at the results from dig, this seems fine:
$ dig mail.eu mx
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> mail.eu mx
;; global options: +c... | Exim4 DNS issues |
1,475,608,012,000 |
Is there currently a Linux email server that will allow me to replicate how Gmail or Outlook allow aliases.
i.e. with Hotmail (which is now Outlook) or Gmail I can sign up on a site and use [email protected] and it will come to the [email protected] account without first having to set up an alias.
|
This is typically called “plus addressing”. Most email servers can do it and were already doing it before GMail and Hotmail existed and copied that feature.
With Postfix, set recipient_delimiter in /etc/postfix/main.cf. This is in the default configuration as shipped by some distributions such as Debian and Ubuntu.
re... | Email server with automatic + sign aliases? |
1,475,608,012,000 |
Today while setting up a mail server using postfix, I practiced to use sender_canonical_maps option, and noticed that it can change outgoing mail "sender" to appear like someone else. When Gmail picked up the mail, it showed the fake sender as the origin.
If mail sender can be easily faked, as an Email end-user, how d... |
For starters, changing the sending mail address is not necessarily "faking". You may simply change the address from one address that is yours to another that is also yours.
But, to answer your question - neither SMTP nor the message format gives you that possibility. Pretty much every piece of spam mail that you get h... | How to identify faked mail origin? |
1,475,608,012,000 |
I'm trying to send email with an html file as the body (it's actually a cucumber results report if that matters) or an attachment (if sending it as the body does not work) via the command line
I've tried the following based on the mutt example in this answer to another question, but it is resulting in an error.
cat <<... |
If you just want to send Audit_Results.html verbatim, use this syntax:
mutt -e "set content_type=text/html" -s "Your audit results" [email protected] < Audit_Results.html
You won't need to pre-edit Audit_Results.html with mail headers, you can just send it directly.
| Trying to send HTML mail on mac OSX Mountain Lion |
1,475,608,012,000 |
I have a cPanel web hosting account. On this account I have a PHP-based support/trouble ticket system for my customers to use. I'd like to be able to send an email to both my customer and to the ticket system, but have the email that goes to the ticketing system appear to come from my customer, so that the support tic... |
Procmail comes with the formail command to manipulate mail headers. The procmailex contains examples of uses in .procmailrc. This should do what you want (untested):
formail -R To: From: -U From: -I Cc: -I 'To: [email protected]'
| How can I rewrite the From: address of an email and resend it? |
1,475,608,012,000 |
While I can find some scattered info on the topic, I can't seem to find a straight walkthrough (or even a definite answer)...
Basically I'm too low on the totem pole to start sending plain-text e-mails. My company requires an HTML signature that includes the logo image.
The problem is I'm fed up with GUI mail clients.... |
This is a huge hack, but somebody has already done the work for you.
Edit: What if you attached your signature as an HTML file?
mutt -e "set content_type=text/html" [email protected] -s "Hello" < mysig.html
| Sending HTML with Mutt (or another terminal mail client) |
1,475,608,012,000 |
I'm using the following very basic shell script I copied off the net to list the contents of my database backup folder and mail them regularly:
MYSQLLIST=$(ls -lhG /var/backups/mysql/daily/)
SUBJECT="daily backup finished"
EMAIL="logging@localhost"
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "dailybackup.sh ran successf... |
Try dropping the command sutstitution that stuffs a variable and then echos it back and just redirect the output of ls straight to the message file.
SUBJECT="daily backup finished"
EMAIL="logging@localhost"
EMAILMESSAGE="/tmp/emailmessage.txt"
echo "dailybackup.sh ran successfully" > $EMAILMESSAGE
echo "MYSQL:" >> $EM... | Enable line breaks when assigning multi line outputs to var in bash |
1,475,608,012,000 |
I am a longtime mutt user (actually switched to neomutt) some time ago and there is one thing I never quite managed to configure to my liking:
I have several accounts that I map to several folders.
I adjust my IMAP/SMTP credentials as well as mailboxes etc. via folder and account hooks.
Since I also use sidebar, I can... |
I also receive emails at multiple addresses (I create a new one for each online organisation I have to create an account with). Setting the reverse_name option works as expected for me – but that’s because I have the alternate addresses configured with a regular expression which matches all my email addresses – and I... | (neo)mutt: Reply to email from the adress the original message was sent to (auto-adjust sender / from-address)? |
1,475,608,012,000 |
I have a situation where I need to delete from mailbox (eg. /var/mail/root) messages with specific Message-Id.
Following code works only from console, but I have to do it without user interaction running from cron /etc/crontab.
File: /tmp/clear_spam_test
mutt -f /var/mail/root -e "set alias_file=/var/mail/root" -e "... |
Same problem here. This mutt command seems to depend on a working terminal window that cron cannot build.
At least for me it helped to start a virtual terminal using screen:
screen -d -m mutt -f /var/mail/root -e "set alias_file=/var/mail/root" -e "set crypt_use_gpgme=no" -e "push <delete-pattern>[email protected]\n<... | CRON (no tty): Delete message with specific "Message-Id" |
1,475,608,012,000 |
On my development machine, I have a special kind of SMTP server running on non-standard port which is used for testing purposes.
On my virtual machine I'm trying to push a message to that SMTP server by using Exim4's sendmail app:
selenium-node$ sendmail -t
To: [email protected]:2525
From: [email protected]
Subject: T... |
SMTP always goes to TCP/25 unless the mail delivery agent (here, sendmail as implemented by Exim) is specifically configured to send the mail to some custom port. There is no means to set the port like there is in URL from the mail user agent that talks to the mail delivery agent. Options thus are limited to reconfigu... | Dealing with non-standard SMTP ports with sendmail -t |
1,475,608,012,000 |
How do I send a mail thanks to swaks with BCC recipients?
|
it easy:
swaks --to email1,email3 --from email2 --server smtp --auth LOGIN --auth-user "" --auth-password "" --header "Subject: test" --data "Subject: test
To: email1
Bcc: email3
From: email2
MIME-VERSION: 1.0
Content-Type: multipart/mixed; boundary=\"123456789\"
--123456789
Content-Type: text/html; charset=UTF-8
Co... | How to send mails with given bcc field with swaks? |
1,483,525,455,000 |
Is there any way to print/predict the Message-ID that mutt will assign to the mail currently being composed?
It looks like it consists of a timestamp, a random string (is it?) and the hostname from muttrc, but it's unclear when this is generated.
|
The message identifier is generated if necessary when the envelope is prepared, i.e. just before mutt sends the email. There doesn't seem to be a way of seeing the generated identifier within mutt before the message is sent. If you manually specify your own identifier in the composed message, mutt will use that...
The... | Show Message-ID for mail being written |
1,483,525,455,000 |
I transferred my email setup to a new laptop, and fetchmail stopped fetching my mail. From what I can tell in the fetchmail log, it authorizes fine, sees that new emails are there, tries to fetch them, and fails due to a persistent "Temporary lookup failure" - here's the relevant log bit:
fetchmail: 2134 messages (21... |
The fetchmail: SMTP ... logs indicate that fetchmail is talking to a Mail Transport Agent (MTA), here Postfix, and Postfix has rejected the message from fetchmail on account of not being able to resolve the (unqualified!) hostname of localhost. Thus, the solution is to correct the DNS (and possibly hostname) for the s... | fetchmail sees mail but doesn't fetch it - persistent "temporary lookup failure" |
1,483,525,455,000 |
I am using OSX 10.9.5
Whenever I open a terminal, it says something like:
Last login: Wed Jan 21 10:29:13 on ttys002
You have mail.
What mail is it talking about ? If I open the mail app, I have no new mail. This is a laptop, and I have not setup a mail server, so how do I find out why it is reporting I have mail ? A... |
Well, you probably have mail. ;)
It talks about your local inbox. Use mail or mutt or from to see your local mails. I'm not sure what mail client is installed per default on OSX, but I would expect to find mail on pretty much any unix system.
OSX, at the end, is just another unix and unix is designed to be a multi-use... | Why does terminal say I have mail every time I open it? |
1,483,525,455,000 |
If postfix is setup as the MTA using its virtual transport to deliver mail to a local mbox file (and handling delivery of outgoing messages), and mailx is the MUA, being used on that same computer for reading and composing messages, can only one of these operations happen at once due to mbox file locking?
If a user is... |
You are right, Postfix will lock the mail file during delivery.
The mailbox is locked for exclusive access while delivery is in progress.
Read more about it here
But that doesnt mean that your other incoming mails will bounce. If postfix cant deliver during a try,
Apr 15 14:02:25 server.tld postfix/local[67533]: D8C4... | How do postfix and mailx interact with mbox locking? |
1,483,525,455,000 |
I am using postfix with maildir format. The filenames of messages stored in maildir look something like this:
1386021659.27745_1.alpha:2,S
I understand the first part is epoch time, not sure about the rest. But I would like to have some human friendlier name, such as
2013-12-18__120502.sender_or_subject_of_the_messa... |
No, Postfix has no way to configure this. As @HBruijn said, the Maildir format is a specification and it would be quite an effort to make the LDA and the MUA both agree on a different format. That said, if you don't like the filenames in your maildir, you could beautify them a bit when you look them up:
$ ls | head -... | postfix: different file name format for Maildir messages |
1,483,525,455,000 |
When extracting a message from my inbox containing the norwegian letter "ø" I find that it is encoded with 3 bytes as "=F8" or hexadecimal "0x3d4638". In UTF-8 the letter "ø" is encoded with two bytes as "0xc3b8", whereas in ISO-8859-1 it is encoded as one byte with code "0xf8".
What kind of encoding is used by my ma... |
It is called quoted-printable.
I take the opportunity to link to another doc worth reading about character encodings: http://utf8everywhere.org/ [of course, not possible in emails, and that's why they use other types of encoding there... But still, good to read when you are about to choose which encoding to use!]
| Mail character set for norwegian characters |
1,483,525,455,000 |
I am running postfix, and it seems it is willing to accept emails for system users, such as man, sshd, daemon, www-data, ...
Is desirable (probably not)? and what I can do to disable this?
|
Any user can potentially run cron jobs. The man user might purge the catman cache. The bin user might do library and package management. The www-data user might purge caches. If any of these cron jobs give output (often to indicate a problem) it is nice to let someone know, and cron does this by default by mailing the... | Restrict emails to system users in postfix? |
1,483,525,455,000 |
I am successfully performing some very basic SMTP sending in my machine with a basic Python script:
.... things ...
try:
smtpObj = smtplib.SMTP('localhost')
smtpObj.sendmail(sender, recievers, message.format(now, now))
print "Successfully sent email"
except SMTPException:
print "Error: unable to send emai... |
It works fine both in my machine and in a Ubuntu server I have in
Virtual Box. Now I would like to send one email from one server using
the other server as a host.
As you mentioned it's working in both machine with localhost not with IP address of host then, might be mail server is running only on localhost, So ... | sendmail through virtual machine |
1,483,525,455,000 |
Emails are now sent from www@hostname, but I want them to be sent from [email protected]
My developer said it should be in php.ini but I figured out this is true only for Win32 systems.
How do I make this change in FreeBSD 8.3-RELEASE-p3?
|
If you use the default mailserver (sendmail), you should add the -f argument to the sendmail_path in php.ini
| How do I change emails from: address on FreeBSD? |
1,483,525,455,000 |
CentOS 5.x
SendMail 8.14.4
An overzealous network security feature is causing TLS negotiations to fail when my Sendmail server tries to talk to external hosts. This is causing sendmail to constantly requeue some messages because it won't fail over to unencrypted delivery.
Is there a way to disable outbound TLS comp... |
I am not sure, but a quick search turned up this which says (emphasis mine):
To be able to send to (or receive from) those MTAs, the ruleset
try_tls (srv_features) can be used that work together with the access
map. Entries for the access map must be tagged with Try_TLS
(Srv_Features) and refer to the hostname ... | Is there a way to completely disable outbound opportunistic TLS support in SendMail? |
1,483,525,455,000 |
I'm running a MediaWiki install under Ubuntu Server 10.10. I have configured it to use the standard php mail() function with my local mail delivery agent (postfix). The mail gets sent from the MediaWiki site, but the only problem is that whenever the address it's meant to be sent to is on the same domain as the server... |
Mails to [email protected] end up in a local inbox because Postfix is configured to use local(8) delivery for the companydomain.com domain. Most likely this happens because companydomain.com is listed in the mydestination parameter, either explicitly or implicitly (because for example myhostname is companydomain.com a... | Mail send to my domain ends up in local inbox instead of exchange server |
1,483,525,455,000 |
I am in charge of maintaining a linux e-mail server running qmail on Red Hat Linux.
Fairly often, I have to trace the path of some email through syslog and to be frank, this is rather tedious.
Are there any desktop apps (or even command tools) that inspect the incoming and outgoing mail logs with better usability inst... |
Have a look at Splunk. You can download a version for free -- at least to dig into a couple log files for you. It will help you manage your log files and also know whats going on in your system. It's quick to setup.
| Drudging through email logs |
1,483,525,455,000 |
Background
An email relaying issue was resolved.
32 email messages to sponsors had bounced to root.
I copied /var/mail/root to /tmp/root.
I deleted irrelevant messages from /tmp/root (using mutt).
All the bounced messages had the same sender.
Requirements
An efficient way to do the following for all 32 messages:
Ex... |
In mutt, start in the message index listing the bounce notification messages of interest.
With the cursor on a bounce notification message, type v to open the Attachment Menu for the bounce notification message.
The Attachment Menu lists all attachments. A description of each attachment is shown. The subject of the o... | How to resend bounced email messages using mutt |
1,483,525,455,000 |
My email provider operates a Microsoft Exchange server through which I send and receive email, using Thunderbird (on Ubuntu 20.04 LTS). I do this both on a desktop computer and on a separate laptop.
Everything works alright, except for the synchronization of message tags. If I tag an email in Thunderbird on the deskto... |
I have found that Davmail works well for me.
(Davmail provides a POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway.) I've been using it for quite a number of years, most recently with Amazon Corretto as the Java runtime. There are times when the Exchange IMAP interface just doesn't work properly - and ... | Email tag synchronization through Microsoft Exchange server |
1,483,525,455,000 |
I am trying to switch away from thunderbird into Neomutt but I need some ability to see the contents of emails without manually opening a pager. I receive way too many emails that are extremely short or don't have useful subjects Either showing the body next to the subject in the Index (like Gmail) or opening a pager... |
You cannot display body content in the index as it's in GMail. But you can easily navigate between messages using any of following solutions.
I assume you use default bindings, but I'll cite the function names in italic also. Both solutions relies on using built-in pager.
Solution #1 unset pager_stop
set pager_stop = ... | Neomutt Show Email Body as preview |
1,483,525,455,000 |
postsuper -d ALL
will delete all mails that are still in the postqueue without sending them again.
But what exactly is happening on the filesystem when you call this command?
I have a snapshot of a mail-system with postfix. Now I want to run the snapshot but do not want to send out remaining mails from the postqueue.... |
TLDR The postsuper -d ALL command deletes all the queued message files, in postfix queueing directories under /var/spool/postfix/.
Long answer:
As an example, having in the postfix queue 3 messages:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
8EDC660C92* 400 Sun May 10 13:42:22 [email prote... | what does "postsuper -d ALL" do on the filesystem? |
1,483,525,455,000 |
Operating system Ubuntu Linux 18.04.2
Webmin version 1.900 (latest)
Usermin version 1.751 (latest)
Virtualmin version 6.06-2 (latest)
I have a problem with Dovecot & Usermin/Virtualmin.
The problem affects ONLY domain users (main virtual server users) - all additional users created, can login to Usermin and access... |
After a whole day of testing, I discovered that this problem happens when one does not run the Virtualmin post-config wizard.
In this case, the file /etc/usermin/mailbox/config is left at the default configuration mail_system=4. Changing this to mail_system=1, fixes the problem when using hashed passwords.
The sectio... | dovecot: imap-login: Disconnected auth failed user=<> |
1,483,525,455,000 |
Background: I'm trying to set up a server to regularly pull RSS feeds, package them up in a mobi-ebook and send them to my kindle.
Problem: If I configure the server to send to my @kindle.com email address (as described here: https://www.amazon.com/gp/sendtokindle/email) I get back an email telling me:
Your email to... |
I'm fairly sure what is happening here is that your mail program is sending its attachments using uuencode format, while mutt sends them in MIME format.
uuencode is an outdated email format and has been largely superceded by MIME, so I wouldn't be surprised that the handler for @kindle.com would not be able to recogni... | Sending attachments with GNU mail to @kindle.com |
1,483,525,455,000 |
I have created a script to shutdown Oracle database but unable to send the output of shutdown while the database shutdown completes successfully.
I only receive email of the echo part but not the actual part of shutdown. I want to capture the output of shutdown and send it via mailx to my emailid.
Also let me know how... |
I generally do what you want like this:
#!/bin/bash
{
cat <<-EOF
=========================================================
Step : SHUTTING Down of database
Start : `date `
========================================================
EOF... | Capture of logs in HTML and send via email? |
1,483,525,455,000 |
Need to get a comma delimited list filenames in an email. Here is some input examples with 1 having lots of special characters:
Content-Disposition: attachment;
filename="How-To_21_Monitor_Mode_Deployment_Guide.pdf"; size=3886046;
creation-date="Fri, 27 Oct 2017 16:23:20 GMT";
modification-dat... |
to get a comma delimited list filenames in an email
GNU awk solution:
awk -v RS='\n\n' 'BEGIN{ fn="" }
match($0, /filename="([^"]+)";[[:space:]]+size=/, a){
gsub(/[[:space:]]*/, "", a[1]);
fn = (fn!=""? fn", ":"")a[1]
}END{ print fn }' file
fn - the resulting string containin... | Parsing filename from raw email |
1,483,525,455,000 |
Below script works fine in my Linux server.
(
echo "From: [email protected]";
echo "To: [email protected]";
echo "Subject: Test Subject";
echo "Content-Type: text/html";
echo "MIME-Version: 1.0";
echo "";
echo "<html><head><title>HTML E-mail</title></head>
<body><p>Test Body Message</p></body></html>";
) | sendmail -t... |
command substitution will replace end of line by space.
use ;" instead of ";
use tr \; '\n' to renable end of line.
use awk to de-indent first char as space
put To: line first
this result in somehow ugly
var1=$(
echo "To: [email protected];"
echo "From: [email protected];"
echo "Subject: mail HTML ;"
echo "Content-T... | Send html format mail stored in variable using sendmail command |
1,483,525,455,000 |
I have a list of 20 e-mail addresses that I'm trying to put in a macro variable as multiple rows in a shell script. In "wide" format it works fine and appears as:
to_list="[email protected],[email protected],[email protected],[email protected]"
I want something like below, and I'm having trouble with the quotes, comm... |
You want something like this:
to_list=(
"[email protected],"
"[email protected],"
"[email protected],"
"[email protected]"
)
mail -s "Subject text here." "${to_list[@]}" < body_text.txt
That is using an array, where you were trying to create a string.
| Put long list of e-mail addresses in multiple-row macro variable |
1,483,525,455,000 |
I have a Debian Jessie (Version 8.1) server that serves multiple domain names. Each has their own folder configured under /var/www/. Each domain name has a unique conf (example.com.conf) file under /etc/apache2/sites-enabled which is linked to a matching conf file under /etc/apache2/sites-available. Each conf file has... |
Reconfigure your config by running
# dpkg-reconfigure exim4-config
General type of mail configuration: internet site
Other destinations for which mail is accepted: example.com
IP-addresses to listen on for incoming SMTP connections: fill in your IP address
Those should be the most important items to change. Remove ... | How to configure EXIM4 to relay emails? |
1,483,525,455,000 |
describing my specific case; on our centOS 6.6 final servers , I've installed yum-cron, in order to schedule a check every night if there are updates from the active repositories.
I preferred to avoid the auto-installation, also following is the snippet of config file : /etc/sysconfig/yum-cron :
# Pass any given para... |
Check if the mailbox file for root (possibly /var/mail/root) is more recent than that of a file touched by the previous check. If so, generate a mail. Regardless, touch the last-checked file. Run this script from cron.
#!/bin/sh
FILE_TO_CHECK=/var/mail/root
LAST_RUN_FILE=/root/.mailboxcheck
if [ $FILE_TO_CHECK -nt $... | Postfix - external email notification when an internal email is received |
1,483,525,455,000 |
It must be soooo simple, but all of the examples that I found after a few hours of googling don't work, as the mail is always attached to the file instead of writing it into the body.
I don't want to send empty messages either, but want to send mail only when I have output from the script. Here is my command:
$script... |
I use mutt to do that, like this. Be aware of argument order, do not place recipient after -a
mutt [email protected] -s "Mail subject" -a /file/to/attach < /file/with/mail/body
| How to embed file content into body of the email using mail command? |
1,483,525,455,000 |
When I login into my vps,
ssh -D 127.0.0.1:1080 [email protected]
[email protected]'s password:
Linux born 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u1 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individu... |
The message is given by your shell, according to the MAIL environment variable. If that variable contains the name of a file, and that file is non-empty, the shell will say "You have mail". The shell then remembers the timestamp of the file and won't mention mail again until that timestamp changes.
If the file is non-... | motd message, when I log in using ssh, tells me I have a mail, how I can check it? |
1,483,525,455,000 |
In our postfix server, the mail directories cur and new are under /home/<user>/Maildir. I don't have much of an experience with mail servers, but I am aware that new e-mails land in the new folder first, and once read, they get moved to the cur folder.
[root@imap01 cur]# ls | head -5
1414497605.Vfd02I42dcbM893399.im... |
Turns out that all we had to do was to combine the last 2 steps I had asked in the question.
Copy the e-mail file, (ie. 141443305.abc123abc.imap01.xyz.com:2,S) from /home/<user>/Maildir/cur to /home/<user>/Maildir/new and rename it by removing the :2,S suffix. This process marks the read mail as unread.
| How to mark read mails as unread in Postfix |
1,483,525,455,000 |
I need to get a look at how my SSL mailserver plays with others; for non-SSL this is easy to do with (e.g.) telnet. Is there a bonified SSL/TLS client that can be used the same way?
|
Yep, gnutls-cli, but there are a few minor tricks required to get it to work.
gnutls-cli --crlf foobar.com -p 465
Some online tutorials for this use -s foobar.com. This does not seem to be necessary, although if the above fails you could try it. If you use -s you will have to hit CtrlD (to send EOF) afterward in or... | Check SMTP over SSL |
1,483,525,455,000 |
I'd like to know if it is possible to configure postfix to redirect to many email addresses (including the original recipient) instead of only one?
Here is my scenario:
When an e-mail is:
Sent from: [email protected]
Addressed to: [email protected]
Result: redirect e-mail to [email protected] and deliver to the origin... |
I fixed the problem with procmail.
Source: http://www.netikka.net/tsneti/info/proctips.php#forward
Below is an example:
#Get the sender's bare email address from the first "From" line
FROM_=`formail -c -x"From " \
| expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g' \
| awk '{ print $1 }'`
#Get the origin... | Redirect specific e-mail address sent to a user, to other email-recipients |
1,483,525,455,000 |
I am trying to block inbound emails for no-reply user and allow it to send emails at the same time. I tried editing the configuration in /etc/mail/virtusertable with:
[email protected] error:5.7.0:550 Invalid Address
But when I tried sending a test email with root, the email got bounced back to my postmaster with... |
I would add an entry to your /etc/aliases file like so:
no-reply: /dev/null
Be sure to rebuild the aliases database with the newaliases command afterwards.
References
How can I point an email alias at /dev/null?
| How to block incoming and allow outgoing mails for a no-reply user on Sendmail? |
1,483,525,455,000 |
I received a really classic spam mail stating that I have to pay a bill. The mail included an attachment (.exe).
Just for curiosity reasons: What would happen if I click on the attachment? (I am running Crunchbang, no Wine installed)?
Is there a way to securely inspect the attachment?
|
Nothing would happen since a .exe file is meant for Windows, not Linux, so without Wine installed, and without a association to run .exe files from your mail client these files are essentially of no consequence to you.
Still as a best practice you should typically never run things directly from email. You should inste... | Securely inspect email attachment |
1,483,525,455,000 |
I have a small postfix server, on a Linux server (Arch Linux) mainly used as a http server.
I use postfix to send database backups and notifications of my web sites. To avoid spamming, I'd like to monitor the output mail queue (e.g. a report of sent emails).
Is there a simple way to do that?
|
You could set up a cron job to run the pflogsumm postfix log analyser and send you a report.
If pflogsumm does not suit your requirements there are other alternative log analysis tools listed at http://www.postfix.org/addon.html#logfile
| Notify on email sent - Postfix |
1,483,525,455,000 |
I've set up postfix (Debian) and it works fine. I can recieve mail and I can send them, but I can only send them to local (and local virtual) adresses.
But when I try to send the mail for example to my Gmail account, I get this in syslog:
Jun 30 18:34:44 vps postfix/smtpd[9087]: NOQUEUE: reject: RCPT from vps[77.93.22... |
You need to allow relaying for hosts you trust.
If vps has a static IP address, you might simply add it to mynetworks. Another popular option is to set up authentication between trusted hosts
See furthermore http://www.postfix.org/SMTPD_ACCESS_README.html
| Postfix - unable to send mails to Internet (i.e. Gmail) |
1,483,525,455,000 |
I'm trying to configure a simple mail server on OpenBSD 5.2, running OpenSMTPD 5.3.1, however there is some problem with my configuration file, and I'm unsure how to fix it. I can send and receive local mail on the computer, but I cannot send external mail from the computer, nor receive it. The following is my smtpd.c... |
The configuration file is OK except you're missing a reference to the aliases table in your accept rules:
accept from any for domain mydomain.com alias <aliases> deliver to mbox
You can run with smtpd -dv -T smtp to get incoming session tracing and see where it fails ;-)
| OpenSMTPD Configuration Problem |
1,336,420,297,000 |
Why am I receiving this error message on Kubuntu since I upgraded to 12.04 and how can I make it stop appearing? It appears as a pop up balloon above the system tray.
Mail Dispatcher Agent: Could not access the outbox folder (Unknow error. (Failed to fetch the resource collection.)).
|
This forum thread discusses the issue and includes various solutions/workarounds, such as deleting /.config/akonadi,
Rather than removing the akonadi configuration, I edited ~/.config/akonadi/aknoadiserverrc and changed StartServer=true to StartServer=false, and then rebooted (although logging out and back in should ... | Mail Dispatcher Agent: Could not access the outbox folder (Unknow error. (Failed to fetch the resource collection.)) |
1,336,420,297,000 |
Ignoring the fact that not all mail servers support TLS:
Is there a way to announce to the world that we would prefer that our inbound mail be delivered via TLS and verified as signed by a trusted CA?
Relatedly, can we announce to the world that they should only accept outbound mail from us (ie, MAIL FROM) if the conn... |
There is the MTA-STS standard for exactly this purpose. It is similar to HSTS in that it declares that the server should be accessed by TLS only. Unlike HSTS it is declared in DNS, so this feature detection can be part of the normal DNS lookups when trying to figure out which server should be used to deliver the mail ... | Is there a DNS-based policy like SPF or DMARC to require STARTTLS sessions for a given domain? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.