date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,528,977,694,000
I'm trying to setup postfix, dovecot and procmail to work together with virtual users. In the end I want to have virtual users and the possibility to add rules to sort incoming rules. For the last thing, I need procmail (right?). When I send an email to my server, I don't get it in my Maildir, and see this in mail.log...
man procmail states: Denying special privileges for "x" Procmail will not take on the identity that comes with the rcfile because a security violation was found (e.g. -p or variable assignments on the command line) or procmail had insufficient privileges to do so. I the presented case the error message is cau...
Procmail: Denying special privileges for "/etc/procmailrcs/default.rc"
1,528,977,694,000
I'm trying to send mail from shell(GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)) using; mail [email protected] After I complete the command, the mail won't show up in the mailbox. What could be wrong, how can I check is my configuration is correct. Thanks.
Like every unix program that occasionally has cause to send email notifications, mail assumes that there is a functioning MTA on localhost that is 1) capable of accepting mail and 2) knows how to pass it on. To find out what mail server you're running, try telnet localhost 25 and look at the identifier string. The com...
How to send mail?
1,528,977,694,000
When I schedule a job/command with at to be executed in the future, the standard output and error of the command is "mailed" to the user that did the scheduling. So after my job runs, I get a message in the command prompt You have mail in /var/spool/mail/mattb which I can then read with mail. Is it possible to have...
at will typically use your installed mail transport agent (MTA) to deliver the mail. If you do not use local mail on the box at all, you can configure your MTA to forward all mail to another server. Alternatively you can use a .forward file for a single user. If you put "[email protected]" in ~mattb/.forward then your...
When I schedule a command with 'at', can I change where the output is mailed to?
1,528,977,694,000
I've been tearing my hair out trying to figure out why running unattended-upgrade wouldn't result in an email in my inbox, only for one to turn up this morning. Is there a way to help debugging a new config by forcing unattended-upgrade to send an email whenever it runs? I don't get any lines about email at all in /va...
It will send an email if you uncomment this line and set it to "always". You dont have to use these sed commands, you can just edit the file. I'm just sharing them because I use several VMs: sed -i 's,//Unattended-Upgrade::MailReport "on-change";,Unattended-Upgrade::MailReport "always";,' /etc/apt/apt.conf.d/50unatten...
Can unattended-upgrades send a test email?
1,528,977,694,000
I have over the last days tried to setup Exim4 to handle all mails sent from a web application. It seems to be working, but I haven't found out how to hardcode the hostname which will be sent with EHLO? (I don't want to set /etc/hostname) Have found the variable MAIN_HARDCODE_PRIMARY_HOSTNAME mentioned in the config b...
Set REMOTE_SMTP_HELO_DATA = whatever.you.want in /etc/exim4/exim4.conf.localmacros. It's supported by the Debian package since 4.69-10. From /usr/share/doc/exim4/changelog.Debian.gz: Allow setting outgoing smtp helo/ehlo by setting REMOTE_SMTP_HELO_DATA macro directly. Previously this was just supposed to be use...
Complete setup of Exim4 as SMTP to reach most inboxes as possible (correct configuration)
1,528,977,694,000
I am using this tutorial to set up Postfix and Dovecot on a CentOS 7 web server. But when I try to send a test email using sudo echo "TEST" | mail -s "testmail" newuser@localhost && sudo tail -f /var/log/maillog, I get an error indicating that Dovecot does not have permissions to create the directory for storing the ...
The key is here: failed: Permission denied (euid=1001(newusername) egid=1001(newusername) missing +w perm: /home/newusername, dir owned by 0:0 mode=0755 Dovecot is trying to write to /home/newusername/{whatever your maildir is} as newusername:newusername, however, the directory is owned by user 0:0 (root). Because th...
ACL/MAC Permissions for dovecot and postfix in CentOS 7
1,528,977,694,000
I have a Debian machine (actually a Raspberry Pi) that I would like to use as a rudimentary, outgoing-only mail server over a residential connection, just for kicks. Port 25 is blocked. I would like to set it up as a standalone SMTP server, not a relay. Is that possible? Comcast gives the impression I can use port 587...
If your ISP is blocking traffic that you send destined for another host's TCP port 25, you will not be able to set up an outbound mail server. Conversely, if they are blocking inbound connections to your TCP port 25, other mail servers would not be able to deliver messages to you. Additionally, it is typically not ver...
Is it possible to have an outgoing SMTP server when port 25 is blocked?
1,528,977,694,000
I would like to run a POP3 server with TLS transport security such that a client must authenticate with a client certificate. (This shields the server from brute force password guessing attacks.) How can I configure kmail2 (KDE 4.12.5) accordingly? There is no obvious (to me) configuration setting for client certific...
If I understand your request I do not think this capability is currently supported by kmail2. At least that's the look of things according to these 2 tickets in the project's issue tracker. Bug 305396 - Add client certificate authentication to KMail2 Bug 131083 - Add client certificate authentication to KMail It doe...
How to configure kmail2 to use client certificates for POP3 and IMAP access
1,528,977,694,000
How do I reply to an Ical/ICS/vcal invite in neomutt or more specific with terminal programs. I can import them to calcurse, but I need to reply too.
Here is a method to view and reply to ical invitations: https://github.com/marvinthepa/mutt-ical Tim Hentenaar's solution can be used for adding invitations to calcurse, and this can be used to view invitations and reply. Installation instructions from the repository's README: mutt-ical.py is meant as a simple way to...
How to reply to a mail meeting invitation with neomutt
1,528,977,694,000
I'm doing my first mail server config on Ubuntu 16.04. In all tutorials and How-To's there's the mail subdomain as in mail.example.com. I'm wondering if this is some formal requirement or just an example of a possible solution that is required by no standards. I'm trying to do it with these DNS records: MX main....
Most domains of any meaningful size have a machine dedicated exclusively to mail, hence mail.example.com. do I also need to create a corresponding CNAME? No, you need an A record for mail.main.dom. MX records should always point to an A. It's a common mistake to point an MX record to a CNAME. With Bind syntax: mai...
What's the point of the "mail" subdomain?
1,528,977,694,000
I'd like to manage all email incoming to *@example.com with a Python script running on my server, which will do various jobs. I've already done a DNS MX record for example.com, directing it my server: mx.example.com MX mailforwarder.example.com mailforwarder.example.com A 1.2.3.4 I...
procmail is considered problematical by Philip Guenther (and is quite possibly useless in this case, as .forward files or equivalent can send the mails directly to your program, skipping the thus needless complexity of procmail). Executive summary: delete the procmail port; the code is not safe and should not be u...
Redirect all incoming email to a Python script
1,528,977,694,000
What is this business about mail and Mail? [On a CentOS box] Why mail does not work but won't return an error either while Mail works fine with the exact same syntax? Mail is basically a link to mail, isn't it? Sorry, this was a mixup, apparently (for historical reasons?!) there is a mail and a Mail Nowadays it looks...
Historically, there have been many incompatible extensions of the original mail command. Mail came from BSD, and took the name Mail rather than mail because it was shipped alongside the incompatible mail program. Later, the same story happened with mailx. For more details read the Heirloom project's write-up on the di...
Mail vs. mail what is the difference
1,528,977,694,000
Until recently my server with Postfix has worked well. Then I enforced some restrictions to a) combat spam b) disable sending emails to me on behalf on my own name -- I have begun receiving emails from my own email address demanding to send bitcoin to someone. I want to fix both a and b. And now I can't send email vi...
Short Answer Your postfix configuration is unnecessarily complex. It seems likely that some of the restrictions placed in your configuration either negate one another or are so restrictive that you may need to ssh into your server and manually send each outgoing mail. Rather than go through the posted configuration, ...
I can't send email via my own Postfix anymore due to enforced restrictions that I made
1,528,977,694,000
When I install a new Linux system, one of my first tasks is to have crontab send all its email to a designated email address, not root. I want to do the same for the at command. That is I would like the at command to send its job concluded email to a different email than the user who invoked the at command. However, ...
CentOS at configuration file is in /etc/sysconfig/atd according to the man page, the mail notification is as follows: If the file /var/run/utmp is not available or corrupted, or if the user is not logged on at the time at is invoked, the mail is sent to the userid found in the environment variable LOGNAME...
How and where is the at command configured?
1,528,977,694,000
I have an internet connection with a public, static IPv4 address (the IP address has a PTR record for foo.org domain, and I own foo.org domain, and have nameservers for it elsewhere, mx record is set to use the static ip). I have an OpenBSD i386 installed on a machine that is the only thing that uses this internet con...
You will be able to send mail, and your users will be able to submit mail to the system, but most if not all mail servers will look for SMTP (port 25) to submit mail to you. You can encourage TLS on the SMTP port, but I don't believe mail servers normally try to deliver to SMTPS.
Is this enough for a working mail server?
1,528,977,694,000
I am trying to run a script with the output to be emailed and watched (monitored), I try using this code: this are the output: >emailmessage echo "output here" >>emailmessage /bin/mail -s "$SUBJECT" "$EMAIL" < $emailmessage and an email will be sent with the results but won't be displayed on my terminal, ...
Assuming your script is running with a controlling terminal (so that the output has somewhere to go to be seen) you just need to add one line: /bin/mail -s "$SUBJECT" "$EMAIL" < $emailmessage cat $emailmessage
how to send email as well as display it out
1,528,977,694,000
I am trying to set up mutt to use maildir format. I have the following in my .muttrc file: set mbox_type=Maildir set folder="~/.mail/" set mbox="~/.mail/" set spoolfile="~/.mail/" set record="~/.mail/sent" set postponed="~/.mail/drafts" In my ~/.mail/ folder, I have the subfolders cur new sent tmp. So far so good....
This is because you have set set mbox_type=Maildir which configures the default mail-box type for newly created mailboxes to maildir. And the maildir standard says that a maildir X must have sub-folders {cur,new,tmp}. A folder sent is not described by the maildir standard. Thus, when you specify as destination ~/.ma...
Mutt and maildir format
1,528,977,694,000
I use a laptop without a mouse as my main work system, and I could really use a fully keyboard-driven email client with graphics support. Right now I have the option of using GUI clients, which, even if they support the keyboard, are optimized for the mouse (buttons and menus taking screen space, actions based on navi...
Thunderbird has the Nostalgy add on: it provides a range of keyboard shortcuts to supplement those already included by default (which is a reasonably extensive list anyway). Additionally, if you find that these are insufficient, you can use the Keyconfig extension to customize your own shortcuts. If you really want a ...
Graphical Keyboard-driven Email Client
1,528,977,694,000
Due to some bad cron jobs I now have ~1600 mail messages, most of them containing the same error log. I would like to quickly group them by subject and delete them, while limiting the chances of missing some important message. I couldn't figure out a way to do anything using the mail command other than deleting each m...
Mutt is really good at this. You could tag-pattern (shift-T) on the common subject string, then tag-prefix (;) delete (d) the matching messages. "Mutt Manual, Using Tags"
Best way to handle lots of mail on server?
1,528,977,694,000
Suppose a student is two hours late in returning an assignment. Now the assignment needs to travel a long way in internet so there is a good excuse that it got lost in somewhere or got jammed (well ok, fails but one always needs to find good reasons to return things a bit late in a funny way). Now is there some way yo...
If you set the edit_headers option to yes, you can edit all the headers of a mail before sending, and you can set your own Date header. A legitimate use for this is choosing your own timezone, or your own calendar. Each server that your email passes through will add a Received header containing the date at which it re...
How can I fake sending -time when sending email with Mutt?
1,528,977,694,000
I have in the past heard of using nail for this task, but I can't seem to find it for my distribution (Ubuntu 11.04) in any of the repositories. What program can I use to one-off emails from a shell like so: send-mail -to [email protected] -file attachment.zip -message "Hello World" Is there a program out there throu...
nail was renamed to Heirloom mailx. For Ubuntu, you want to install the heirloom-mailx package, and then read the Sending mail from scripts section of the manpage.
How can I automate sending mail using a script?
1,528,977,694,000
Mutt is connected to a Gmail address via IMAP. When a new message arrives, quite rightly it is marked with 'N' within the index. Reading the email, this flag is removed ... however any other clients / gmail.com still displays the email as being unread. I have gone through the Mutt doc but cannot find anything about u...
In mutt and neomutt you need to sync mailbox to write changes to the backend. It doesn't matter if the backend is maildir, imap or notmuch. The function is called <sync-mailbox> and is bound to $ by default. Changing the mailbox to a different one or closing mutt should trigger the sync-mailbox function too.
Mutt mail - read / unseen flag not syncing with server
1,488,211,903,000
Is there a way to have getmail get the password from a gpg encrypted file instead of leaving it in plain text?
Yes you can. Add your key to gpg-agent or gnome-keyring, and configure either gpg -d or pass to write to stdout without prompting for key unlock. Mind to only include the password in the file. In ~/.getmail/getmailrc: password_command = ("/usr/bin/pass","email/gmail.pw") I installed getmail 5.5 from the official websi...
Can I store my getmail password in a gpg file?
1,488,211,903,000
I am working in the computer at home I want to send me an email and I tried: uuencode all.sh all.sh | mail [email protected] But the problem is that nothing arrive to my email, I just get the following error: mail: cannot send message: Process exited with a non-zero status The fact is that I use the same command in...
The basic mail command is only a mail reader and composer, it doesn't know how to talk to a server over the network (with the SMTP protocol). Talking SMTP is the job of a MTA (message transfer agent). The default MTA on Ubuntu is Postfix. To configure Postfix, run sudo dpkg-reconfigure postfix If you only want to sen...
What should I configure to send mail on the command line?
1,488,211,903,000
Frequently, I use mutt's alias functionality, to send a message to larger groups of people (legitimate, not spam!). Normally, I put the alias into the Bcc: field, to cancel out spam harvesters, and for privacy reasons (not all recipient know each other). By accident, I sometimes put the alias into the To: or Cc: fiel...
AFAIK, Mutt itself cannot do such checks, but there's a workaround! The idea is to redefine the $sendmail variable to use a wrapper that will check the mail before sending it. For instance, in your .muttrc file: set sendmail=$HOME/scripts/sendmail-mutt This script can either terminate with an error (non-zero exit sta...
Avoid mutt sending mail with too many entries in To: or Cc: fields
1,488,211,903,000
If a cron job produces output it is e-mailed to the user's account. I would like to redirect this e-mail to another e-mail account. Preferably on a user-by-user basis. I've looked into some options that are often mentioned in other postings: Using the cron MAILTO variable. Won't work. That one is not supported on Sol...
If you want to forward all of a user's mail, not just the mail from Cron, Solaris does support ~/.forward. Solaris also supports global aliases in /etc/mail/aliases; if you modify this file, you need to run newaliases. If you only want to forward mail from cron, you can set a filter in ~/.forward or /etc/mail/aliases....
Solaris: how to forward cron e-mails?
1,488,211,903,000
I am trying to find a way to connect to a mail server and find out how many emails there are in a specific directory. In this specific case, it is the Spam directory in my Gmail account. I am not trying to download the emails in this directory but just count or query the number. I also need to be able to do this from ...
I managed to find another easier way of doing what I need using Curl and the IMAP protocol: curl --url "imaps://imap.gmail.com" --user "<email address>":"<password>" -X 'STATUS [Gmail]/Spam (MESSAGES)' Stdout for this command will be the following (with X being the number of messages present, both read and unread): *...
Get number of emails in specific directory on mail server
1,488,211,903,000
On my desktop I get a GNOME notification when an SELinux violation has occurred which makes debugging simple but for servers I do not have this. Is there any way I can set up SELinux so when there is a violation it sends me an email with the details? NOTE: I have a couple (2) servers that I'd want to deploy this on
Based on one of the comments regarding setroubleshoot you can install this extra package like so: $ sudo yum install -y setroubleshoot Once installed take a look at its config file, specifically this section: [email] # recipients_filepath: Path name of file with email recipients. One address # per line, optionally fo...
Send email on SELinux violation
1,488,211,903,000
Is there a way to assign two ports to the same service in firewalld? For example, I would like for the SMTP service to listen on both port 25 and port 465. My first instinct is to change /usr/lib/firewalld/services/smtp.xml to read as follows : <?xml version="1.0" encoding="utf-8"?> <service> <short>Mail (SMTP)</s...
You could either create another service: <?xml version="1.0" encoding="utf-8"?> <service> <short>Mail (SMTP on port 465)</short> <description>This option allows incoming SMTP mail delivery on the alternative port 465. If you need to allow remote hosts to connect directly to your machine to deliver mail, enable thi...
assigning two ports to one service in firewalld
1,488,211,903,000
On my Raspbian server, I wish to have local *nix mail delivered locally, as well as to an external address. /home/pi/.forward contains pi,[email protected]. I've run sudo dpkg-reconfigure exim4-config with the following options. mail sent by smarthost; received via SMTP or fetchmail. System mail name: raspberrypi. IP...
With most mailers you can do something like this in the /etc/aliases file. joe: joe, [email protected] After making changes to this file you typically have to run the command, newaliases. References How to redirect local root mail to an external email address on Linux Forwarding email and must keep a copy
How can I forward local *nix mail to an external account while keeping the local copy?
1,488,211,903,000
I was greping syslog on a server for errors and noticed these lines that had nothing to do with what I was looking for but was alerting enough: kernel: [8456851.218586] ata2.00: irq_stat 0x08000000, interface fatal error kernel: [8456851.220076] res 50/00:00:80:45:c1/00:00:08:00:00/e0 Emask 0x10 (ATA bus erro...
I use logcheck to scan my log files. It scans new entries once an hour and emails me any unknown lines as well as known lines which are classified inclusion in the report. There are also tools which will watch your log files and email you when they certain content.
email alerts when serious system errors occur
1,488,211,903,000
I'm trying to configure spam filter on VPS Debian Squeeze, exim4-heavy + spamassassin and dovecot. Exim version 4.72, SpamAssassin version 3.3.1, Perl version 5.10.1 And I have an irritating problem with spamassassin: messages has no X-Spam headers. Exim4 config: ### main/02_exim4-config_options spamd_address = 127.0....
the problem you are facing is, that things work a little bit differently than how you expect them to run. this is not how it works: exim receives an email exim passes the email to spamd spamd checks the email for spam and adds necessary headers spamd passes the (modified) email back to exim exim delivers the email i...
missed X-Spam- headers for all messages in exim4 + spamassassin
1,488,211,903,000
I would like to hold all outgoing email for certain users (all users except a few) for a set period of time, or until I approve (even if that means changing a config and restarting the service). Users should have no indication their mail was not delivered. All the guides I am seeing show how to do this for outgoing do...
You can use the action HOLD returned by access control. For example: /etc/postfix/main.cf: smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/sender_access /etc/postfix/sender_access: [email protected] HOLD [email protected] HOLD Then you can manage the release of the hold using the pos...
How to hold mail for only certain users with postfix?
1,488,211,903,000
I just made it through this helpful article and successfully have my mail server set up with a single domain. What I'm wondering now is how I can be able to add multiple email account for different domains. To add a new email account currently, I would use the command: useradd -m john -s /sbin/nologin That would allo...
You would use a virtual_map to map virtual users in your second domain to either real users on the server or to other addresses (similar to an alias). e.g. in /etc/postfix/main.cf you would have: virtual_maps = hash:/etc/postfix/virtual and in /etc/postfix/virtual: example.com VIRTUAL [email protected] ...
How can I have multiple email accounts from different domains using Postfix?
1,488,211,903,000
I know that you can change the from address in *nix mail by specifying command-line options. However, is there a way to set it globally, so that it is respected by forwarding? I tried modifying the $REPLYTO environment variable, but this did not help. Background I have set up my Raspbian mail to forward by configuring...
It sounds like you want Exim's address rewriting. In the rewriting section of your Exim config file, you will probably want something along the lines of this: [email protected] [email protected] Ffr You may need to adjust the flags ("Ffr") to the specific behavior you want. More generally, see: http://www.exim.org/ex...
How can I change the from address in *nix mail globally?
1,488,211,903,000
I setup the simplest outgoing email server possible with ssmtp. It is giving me the error Authorization failed (535 Authentication credentials invalid). Here is my configuration without comments: # /etc/ssmtp/ssmtp.conf [email protected] mailhub=mail.gmx.com:465 rewriteDomain=gmx.com hostname=HP-Q101 rewriteDomain=gmx...
Change your config to match this: # /etc/ssmtp/ssmtp.conf [email protected] mailhub=mail.gmx.com:587 rewriteDomain=gmx.com hostname=gmx.com FromLineOverride=YES [email protected] AuthPass=yourpassword UseSTARTTLS=YES Source: https://help.gmx.com/en/applications/pop3.html
Setup GMX email with SSMTP
1,488,211,903,000
What is the most portable or standard way to send an email from the console or a script on Linux, and possibly Unix?
To do this, you can use the mailx command. Below is an usage example: mailx -v -s "Subject" -S smtp-use-starttls -S ssl-verify=ignore -S smtp-auth=login -S smtp=smtp://<server_name>:25 -S from="[email protected]" -S smtp-auth-user=<username> \ -S smtp-auth-password=<password> [email protected] This example is using S...
Standard and portable way to send email from console?
1,488,211,903,000
In my ~/.procmailrc I have the following lines: :0 \* ^Subject:.*(O|o)pen( \|)(S|s)(onic|urge) $MAILDIR/OpenSurge/ As you see, I would like to put any mail containing “Open Surge” (or any variant with space or capital letters) in the folder OpenSurge. But the messages containing this words only went to the default fo...
How about this: :0 * ^Subject:.*Open[ ]*Surge OpenSurge The default settings for procmail is to ignore case. See also D. A matching message is stored in the file OpenSurge. It is normally located in ~/Mail/. [Edit] If you additionally want to match "Open sonic", you can use the regexp from @Bruce Ediger, but there ar...
procmail recipe with a regex doesn't work
1,488,211,903,000
I installed Getmail to retrieve emails from another email server and Procmail to filter the incoming emails. (I am running Debian/Squeeze.) The recipe I created has this code: :0: * ^[email protected] Xyz I thought this will make sure that all incoming emails will be saved in ~/Maildir/Xyz/ as individual files. Inste...
The top level of procmail recipes are reserved for assignment of procmail variables. Add the following to the top of your procmail recipe. MAILDIR="$HOME/Maildir/" When defining where the mail should be delivered, you have defined Xyz as a file, not a directory. It should instead read: :0: * ^[email protected] Xyz/ ...
Savings emails as individual files using Procmail
1,488,211,903,000
I use Mutt Maildir for storage mails. I created one mailbox like this Stack Exchange/. (whitespace between Stack and Exchange here) procmailrc recipe: :0 * From: .*Stack\ Exchange Stack Exchange/ But upper recipe destination setting failed. after test and watch the log file. I found procmail jumped through Exchange/,...
Even though it isn't mentioned in the procmail manual, I believe (I haven't checked) that putting a backslash before the space removes its special meaning (like in other parts of procmail). :0 * From: .*Stack\ Exchange Stack\ Exchange/ If that doesn't work, use a variable. STACKEXCHANGE_MAILBOX=Stack Exchange :0 * Fr...
How to use whitespace in procmailrc recipe destination path?
1,488,211,903,000
I've been using SSTMP on a local FreeBSD machine to send stuff like the output of certain cron jobs to my "real" main email account, which is not hosted on the same machine (or even domain). For example, I have a daily cron job set up as so: smartctl -a /dev/ada0 | grep overall-health | mail -s "Silicon daily smartctl...
I've figured it out and fixed it. I took a look at the ssmtp source code to try to figure out the situations in which it will add a RCPT TO line for something. This then led me to try to figure out what command line args ssmtp was being called with. I found that mail was calling ssmtp with some rather bizarre-looking ...
Where are these "extra" RCPT_TO lines coming from when I send an email via SSMTP?
1,488,211,903,000
mutt in Centos 7 I write this to help others as the articles I found were a mess and did not explain properly. So when I am in an email in Mutt and I naturally scroll out of instinct, mutt sends me back to the previous indexed screen to the list of emails and scrolls there, it drops me out of the current email I am tr...
For Me it was: login as root >sudo su - using nano editor (i prefer nano) edit this file in the hone directory of the user (i think) >nano .muttrc add these 2 lines: bind pager <up> previous-line #scroll inside the message rather than the index bind pager <down> next-line" Save in nano CTRL X Y Enter do this for ...
How do I prevent scrolling to the next email when I mouse scroll in mutt. mutt in Centos 7
1,488,211,903,000
I'm looking at the mail command which fires off Heirloom Mail. My procmail failed and it has 55 messages in the queue. I need to forward them out to another email and then process them manually. I'm not sure how to get them from the Linux server out to my email though.
I discovered that I had to "set forward-as-attachment" then I could forward out the mail...
Is there any way to forward mail from the command line in Linux
1,488,211,903,000
I'm sending email using Postfix on my Debian server, which is working fine. Now I want to receive email by forwarding all incoming email to my email address (which is not on this server). I got this working using the following config: /etc/postfix/virtual: /.+@.+/ [email protected] /etc/postfix/main.cf: virtual_maps ...
Rewriting the From header field would not help with protecting your ip address from getting blacklisted when the receiver of that mail marks it as spam as your ip address will still be the one that transmitted that e-mail, but might make the receiver realize it is being forwarded. You can use postfix header_checks fea...
Rewriting from header when forwarding email using Postfix
1,488,211,903,000
I have a remote server which has some issues (Seem hardware related) which means that it logs KVM errors and then sometime later it becomes unresponsive and locked up. There is an often an early indication of it failing, in the dmesg log output, so I would like to know, is there a Debian utility which can send me (da...
In the past I've used logwatch to do exactly this. Directions on customizing it are here, titled: HOWTO-Customize-LogWatch. Installation $ sudo apt-get install logwatch Setup Logwatch runs daily but can be configured to run more frequently It's typically kicked off from a crontab entry. $ ls -l /etc/cron.daily/0logwa...
dmesg email digest
1,488,211,903,000
I'm using mutt to process my mail. There is one sender which declares the wrong content type. The mail arrives with Content-Type: multipart/alternative; boundary=--… and has two parts. They are declared as: Content-Type: text/plain; charset=utf-8 and Content-Type: text/html; charset=utf-8 However both parts of th...
In mutt, you can type v, and then select the alternative you want to display. You can also change the content-type of a part with Ctrl-E. As a more generic approach, you could use mutt's display_filter setting: set display_filter=/path/to/mutt-filter With mutt-filter being something like: #! /usr/bin/awk -f BEGIN { ...
Modify an incoming mail from text/plain to text/html
1,488,211,903,000
I am wondering if it is possible to : Store a mailbox in a way that the system administrator (ie: root) cannot see it User(s) with the valid credentials would be able to see it AND be able to search quickly in it, preferably via http access I know that I can: Encrypt on the partition level, but it won't disallow t...
This is impossible: root can always access all data. Even if you encrypt it, as soon as you decrypt it for access, root can snoop on the data, and snoop on your credentials as well. You cannot protect anything from the local root. You can store files on a machine whose administrator you don't rust, but you need to enc...
Is there a good way to encrypt and store a mailbox while still being able to quickly access and search it?
1,488,211,903,000
I'm new to Slackware and I think It's beautiful Distro. When I login it with ssh it prints motd, quote and a line for informing mail like this Linux 3.10.17. Last login: Thu Oct 23 06:28:08 +0330 2014 on /dev/pts/0. No mail. "The other day I put instant coffee in my microwave oven ... I almost went back in time." ...
(Disclaimer: I'm an Arch user, never used Slackware.) The program that prints the quotes is usually called fortune. It's available on most distros I have used, but the specific set of quotes may vary. Look in /etc/profile, or in scripts in /etc/profile.d for mentions of fortune. According to the description of the bsd...
How does Slackware Login quotes work?
1,488,211,903,000
I'm new to GNU/Linux and I want to send e-mail to other users on my computer (specifically from root to david). I've searched on google and I have tried the following: # mail david Subject: some subject. The message ... ^D Cc: But when I login on the system as david and type mail it says ...
You can send mail to your gmail account using: $ mail -s "Subject" [email protected] Body Text ^D Cc:^D If it doesn't work, then check if mail is installed. $ which mail If this command doesn't give anything, then mail isn't installed. To install: $ sudo apt-get install mailutils OR # yum install mailutils etc ......
mail doesn't work [duplicate]
1,283,180,111,000
Can anyone give a recommendation for a simple X-based equivalent of mail / mailx for reading the mail I get from cron jobs?
Evolution is fine, but heavy. Sylpheed is simpler and doesn't use as many resources.
X-based email for reading mail from cron jobs
1,283,180,111,000
I am running Debian Jessie 8.1. The VPS provider says that port 25 is open. However, when I installed Rainloop and am not able to use it with the System users. Under the RainLoop admin panel I went to Domains, and added: localhost, 127.0.0.1, 123.123.123.123 (as my server's IP address), and example.com (as my main d...
Honestly, I have no idea what was the issue. I had to remove and purge all related packages. It is important to purge because remove only removes the files, but not the configuration files, therefore, the folder structure will stay behind with any conf files. The purge command removes the files and the configuration f...
How to know if port 25 is blocked? [closed]
1,283,180,111,000
Server is Debian 6.0. In /etc/aliases I have; root: [email protected] This is so that root emails get sent directly to me. Today, a monthly script I have placed into /etc/cron.monthly has emailed me it's output. It a fairly simply script which looks like this; #!/bin/bash cd /a/directory rm -rf ./* wget http://www.si...
An easier method is to instead of adding the script to the cron.monthly directory, you add it to an old-fashioned crontab, where you can specify on the crontab line that you want output to go to /dev/null. Like this: crontab -e to edit the crontab. Then add the following line: @monthly /path/to/script > /dev/null Th...
How to stop monthly cron output email
1,283,180,111,000
I am curious how system daemons on a local Linux host send email. Is there some type of email framework already built in? Do I need a MTA or a MUA? What part does "Sendmail" play and is it a requirement? How would I configure the server to be able to send via another host? How does the “mail” command fit into this? ...
You've asked a pretty broad question—explaining all of it in detail would take many pages. In brief: There are several programs involved in sending mail on a Linux/Unix machine. There are many to choose from for each role: Mail User Agent (MUA). This is what you read and compose mail with. It's the user interface to ...
What email features/functionality are baked into a typical Linux/GNU distro? [closed]
1,283,180,111,000
Background I own a domain with a catch-all, so that all email sent to *@foo.bar goes to one account. I have unique usernames for particular organisations, e.g. [email protected]. If an email address is compromised and I start receiving spam, I can delete the account, creating a new one at [email protected]. (This work...
You can configure mutt to use different from addresses (via your ~/.muttrc), e.g.: set use_from = yes set envelope_from = yes set from = [email protected] set realname = "Default Realname" # list of all your addresses alternates @example\.org$ You can setup some macros to explicitly switch the from before composing a...
Can I automatically send from specific email addresses in Mutt?
1,283,180,111,000
As many people, I too have several email accounts. Until now, I have been using Thunderbird for my main account, and either used web interface for the other accounts, or used other email clients (Sylpheed, Balsa, ...). For some reason, I never liked the idea of having separate, independent accounts integrated in one e...
You can start Thunderbird from the commandline with the -P <profile> option to specify a different profile. Within the different profiles you have complete seperation. IIRC specifying a profile implies the -new-instance option when starting thunderbird but if not, just add it. To create a new profile start thunderbird...
Using several independent instances of Thunderbird
1,283,180,111,000
I have a Bugzilla 4.2.4 install that is now unable to send email. It was able to send email without issue up until about a month ago (after about three months without issue). If someone posts a comment, a new bug or anything else that should generate an email, after they hit submit the following page takes forever to ...
When I get stuck like this I'll often use strace to fish for clues. Here's a handy one-liner to do it ps -ef |grep apache |grep -v grep |awk '{print $2}' | while read pid ; do sudo strace -p$pid -o /tmp/strace.$pid & done It gets all the apache pids, and attaches a strace to each of them, writing their output each to...
No idea how to troubleshoot Bugzilla email issue
1,283,180,111,000
I need to send the generated CSV files on regular intervals using script. I am using UUENCODE and mailx for the same. But i need to know that is there any method/way to know that email sent successfully? Any kind of acknowledgement or feedback or something??? It is likely to report for any error. Also the file is conf...
Email was designed back when computers did not have a permanent, fast network connection to each other, on the model of postal mail. When you send an email, it gets sent to a server, which sends it to another server, and so on until the email reaches its destination. The oldest mail systems had local delivery, then th...
Is there any way to check email sent success acknowledgement?
1,283,180,111,000
What programs are available to archive a mailbox (to mbox or maildir format) that I can only access via POP3? I'd like to be able to browse the mailbox locally afterwards, probably using mutt or the like. I'm on Debian stable, no problem to compile from source if needed, commandline preferred.
I prefere fetchmail. It can fetch from POP3 or IMAP accounts, to local directory. You can then use mutt for browseing it. Cheers,
How to archive POP3 mailbox?
1,283,180,111,000
I've been recently try to write a script to automate checks for new version of ports and software installed on my FreeBSD server. This script is added to root's crontab and fires daily. If I run it from sudo /path/to/script it goes forward decently sending mail with content on my email address. If it's run by cron I g...
Auto-upgrading from cron is kind of a bad idea. You should really read /usr/ports/UPDATING in case there's some sort of manual action that needs to be taken. I'm sure this probably won't be very popular, sorry, but it's true. There's a reason UPDATING exists. As far as your script goes, you can define BATCH=yes in /et...
Bash port auto upgrading script in cron doesn't work properly?
1,283,180,111,000
I'm studying and learning about how mail is handled in linux systems, and one thing has become a source of confusion for me. On my iPhone, via IMAP, I can mark a message in my Gmail inbox as read, or I can move it to another folder ("label" in Gmail speak). Then when I later view my Gmail account via web interface, ...
No. When you read email via IMAP, the mail stays on the server. The client just downloads individual messages as needed to display them. When you mark it read or move it to a folder, the client just sends a message to the server asking it to do that. When fetchmail downloads a local copy, what happens to that copy ...
Does fetchmail support these IMAP features? If so, how?
1,283,180,111,000
In Ubuntu/Gnome under the mail icon in the tray, there are chat, mail, and broadcast. opening the chat logs into your IM accounts and keeps you logged in when closing the main window. But it appears that for the mail (ie evolution), when you open it it logs in and checks mail, but stops checking mail as soon as you c...
This is a known bug/missing feature in Evolution. If you don't mind installing software from a PPA, you can install Geoff Goehle's patched evolution/evolution-indicator. This should give you an option in Evolution's plugin configuration to "hide it in the applet" if it is closed: https://launchpad.net/~goehle/+archiv...
Evolution Check mail when Window is closed
1,283,180,111,000
Claws Mail uses the MH format according to its manual. Mbox vs Maildir: Mail Storage Formats states that The Unix world has two ways of storing mail messages, the traditional mbox format and the newer maildir format. Postfix and Dovecot supports the two mail storage format so you can use any format, but I highly reco...
MH is the name of a set of programs used to handle email; their current incarnation is nmh. The “format” they define, which uses one file per message and a simple directory layout, is not the same as either mbox or Maildir. As you mention, this is Claws Mail’s native format. Maildir is effectively a descendant of MH, ...
MH format is special different from both mbox and maildir?
1,283,180,111,000
I'm using procmail with Maildir/ and easy rules like the one below to save incoming emails into directories: :0: * ^X-Spam-Status: Yes Spam/ Now I would like a desktop notification on new emails in certain directories/rules, I know already how to handle notifications but how to tell procmail to save into a directory ...
Here's a slight adaptation of @slm's answer. You should not use locking with Maildir, and the flags and the lock colon were the wrong way around. (You would effectively create a lock file named c, rather than clone the message, so the second action would never fire.) The f flag seems out of place. I reversed the orde...
procmail save into a dir and execute a script?
1,283,180,111,000
I want to use the mailutils app on a install of Ubuntu 12.04.3 LTS with a Maildir format, but every time I run the mail command, the system looks in /var/mail/user, instead of the Maildir directory in the home folder. I'm aware that setting the MAIL variable will resolve this, however the changes only last until the u...
Fixing the variable If you'd like to make this change system wide I'd be inclined to add an entry in the directory /etc/profile.d for it. You can simply put a file in there with the contents as follows: # /etc/profile.d/mailenv.sh MAIL=$HOME/Maildir or MAILDIR=$HOME/Maildir This environment variable, $HOME, should b...
Maildir and mailutils?
1,283,180,111,000
So I found a bug, fixed it, and want to send the patch for it. I followed the Write and submit your first Linux kernel patch youtube video, set up git-email, formatted everything, etc., and want to send it. My issue: I don't want to send it alone but with an accompanying message and sample userspace code that gets fix...
When you extract your commit, add --cover-letter to the git format-patch options. This will extract your commit with a 0001 prefix, and create a cover letter template with a 0000 prefix. You can edit that to contain your accompanying message and sample code, then send both with a single git send-email invocation: your...
How do I send a patch with an accompanying message to the Linux kernel?
1,283,180,111,000
Need here to schedule some email sending at some date with at command, but need first to ensure that Eth0 interface is up and running. How could I do that? Currently using Mutt Mail User Agent already configured. Just adding the information that if Eth0 is down in the scheduled moment, it won't send the email.
First to check if Eth0 (wired) connection is running: $ nano eth0ch.sh #!/bin/bash if grep -Fxq "up" /sys/class/net/eth0/operstate then echo "Eth0 Up" else echo fi exit 0 $ sudo chown root:root eth0ch.sh $ chmod +x eth0ch.sh Copy it into /usr/bin $ sudo cp eth0ch.sh /usr/bin/eth0ch Second to halt if i...
How can I schedule an command with `at` which requires `Eth0` interface to up and running?
1,283,180,111,000
I would like to lessen the noise from logwatch reports sent to my email on three systems. Is it possible by to configure logwatch to send only some days in the week, or once a week? More relevant data: logwatch8-is-too-noisy-how-can-i-control-the-noise-level on SERVERFAULT /usr/share/logwatch/default.conf/logwatch.co...
You can tell logwatch to look at 7 days instead of 1 day by changing the Range parameter in your logwatch.conf: Range = between -7 days and -1 days You can tell logwatch to run weekly instead of daily by moving it from the daily cron directory to the weekly cron directory: mv /etc/cron.daily/00logwatch /etc/cron.week...
Have logwatch send reports only once a week
1,283,180,111,000
I use the following regex to find email addresses: echo "[email protected]" | awk '/^([a-zA-Z0-9_-.\+]+)@([a-zA-Z0-9_-.]+).([a-zA-Z]{2,5})$/ {print $0}' But it returns the error: awk: cmd. line:1: error : tent of \{\}
Short version, use this: $ echo "[email protected]" | > gawk '/^([-a-zA-Z0-9_.+]+)@([-a-zA-Z0-9_.]+)\.([a-zA-Z]{2,5})$/' Assuming the actual error message is something like: awk: cmd. line:1: error: Invalid range end: … Then, there are 4 issues in your line: The dash (-) means "character range" not an explicit...
awk: error : tent of \{\}
1,283,180,111,000
I have several emails on my server that is used by some people. Some were created years ago and I suspect are not being used anymore. Thru ftp I see the folders .Drafts .Junk .Sent .spam .Trash cur new tmp and the files dovecot-acl-list dovecot-uidvalidity.53836d02 dovecot-uidvalidity dovecot-keywords subscriptions ...
Some background first: your mailboxes are in Maildir format. Maildir mailboxes have three subdirectories, tmp, new, and cur. Of these, tmp is used only for delivery, new contains new messages, and cur read messages. Once delivered messages consist of immutable files in new and cur. A message changing state from "n...
How do I know the last time an e-mail was used
1,283,180,111,000
I have a postfix server running on an EC2 instance. I want to forward all email, via SES, to my personal inbox. The problem: AWS only allows a FROM address that is verified in the AWS console and the FROM address in this case could be anything, for example: twitter.com. I cannot white-list my server's IP and say: "Acc...
Based on our discussion in chat, I'm going to provide you my hackish, customized solution that will change the "FROM" address as we expect it to be, and then deliver to the original destination point but add the "Reply-To" header. This is a very hackish approach, but should manipulate the messages as you expect before...
Forward email but change the FROM address
1,283,180,111,000
Related question reference here Below is my procmail recipe which works fantastic ... :0bf * ^Subject.*register$ | /usr/bin/php -f /root/data/scripts/register.php However, the recipe/script above takes up to 3 hours to complete (lots of data to process and convert), and only then does procmail continue further proces...
Remove f flag from the recipe without adding w or W flags. f flags marks filter. It makes procmail rewrite the message for next procmail rules in the procmail script. Procmail has to wait for the filter command to finish. f flag description in procmail mini-faq Q: How can I change the contents of a message but othe...
Procmail does not continue processing untill recipe is finished
1,283,180,111,000
I'm in the process of configuring Gnus to retrieve emails from my gmail account via IMAP. I have done as recommended at https://www.emacswiki.org/emacs/GnusGmail, however I keep on getting errors from Gnus upon startup: Opening connection to imap.gmail.com via tls... nnimap (gmail) open error: 'NO (ALERT) Please log i...
Gmail does not allow IMAP access by default from clients that don't meet its nebulously-defined security standards - I ran into the same thing testing some scripts I was writing with Python's imaplib. You need to go to the website and enable connections from less secure apps. Information page from Google (includes dir...
GNU Emacs Gnus can't connect to gmail IMAP
1,283,180,111,000
I am trying to auto-reply using procmail. I want to send back an HTML form with attachments (images; jpg/png). Is there a simple way to accomplish this? This is my piece of code so far: :0 | ($FORMAIL -rA "$XLOOP" -i "Content-Type: text/html; Content-Transfer-Encoding: base64" -A "Reply-To: [email protected]" -I "From...
What you have should work, provided the file $HOME/reply.html is correctly formatted. Alas, as per your description, it isn't. Incidentally, I would factor out as much as possible of the static headers into this file, and only use formail to prepend headers which cannot be calculated in advance. That leaves you with...
Procmail - auto reply with attachment
1,283,180,111,000
I use this cron job to do a backup of /home/blah/ each day at 01:00 a.m. : 0 1 * * * tar -zcf /home/blah/backup.tgz /home/blah/ In fact I would prefer that an email is sent to me with the .tgz file as attachment. (yes, the filesize will always be < 5 MB because my folder is very small) Can I do something like : 0 1 *...
This following command worked for me when I tested in my machine. echo "This is the message body" | mutt -a "/path/to/file.to.attach" -s "subject of message" -- [email protected] So probably the approach to follow will be something like, tar -zcf /home/blah/backup.tgz /home/blah/ echo "Please find attached the backu...
Send backup by email with crontab
1,283,180,111,000
I am trying to forward emails that are fetched with fetchmail to another SMTP host, which enforces STARTTLS. I could not find a way to enable TLS in fetchmail. Is this possible at all? If so, how?
It does not appear that fetchmail supports TLS to the SMTP server. This is normally not a problem, as it usually delivers emails locally. You can work around this by delivering to a local SMTP server and have it handle the delivery. If your don't need or want a full service server like exim4 or postfix, you can use...
Does fetchmail support SSL or TLS when using SMTP to forward email?
1,283,180,111,000
I would like to use a bash script (python would be second best) to monitor regularly (hourly) if my mailserver is online and operating. I know that there are dedicated solutions for this task (Nagios, ...) but I really need something simple that I can use as a cronjob. Only to see the mailserver is alive. I know how t...
You can use nc to test a SMTP mail server like so: $ nc -w 5 mail.mydom.com 25 << EOF HELO mail.mydom.com QUIT EOF NOTE: The options -w 5 tell nc to wait at most 5 seconds. The server to monitor is mail.mydom.com and 25 is the port we're connecting to. You can also use this form of the above if you find your server i...
simple script for monitoring a mailserver
1,283,180,111,000
Is there a way to use Maildir instead of mbox on a Linux box? On some websites, it is suggested to add to /etc/aliases: myuser: /var/mail/myuser/maildir I've issued the newaliases command, but it didn't work.
If you're on Ubuntu... Instruct Postfix to use Maildirs instead of Mboxes: sudo postconf -e "home_mailbox = Maildir/" Restart Postfix to make changes effect: sudo /etc/init.d/postfix restart Check the mailbox of fmaster: su - fmaster MAIL=/home/fmaster/Maildir mail You can find complete guide here. If you're on Ce...
Linux: Use maildir instead of mbox
1,283,180,111,000
I've recently been teaching myself about the BSDs and decided to pick up a NetBSD VPS. I don't always log in to this box every day (it's not actually doing anything that important), but I'd still like to monitor root's mail. To that end, I started looking into how to forward root's mail to an external account. I learn...
You could create a normal user, e.g. juser, and add it to the /etc/aliases file on the right hand side of the root entry. For normal forwarding of root-mail you would just create a .forward (which contains your external e-mail address) in the home directory of juser. Regarding encryption you can use a MDA (mail delive...
How to automatically encrypt, sign, and forward root's email?
1,283,180,111,000
On my Debian system I have a traditional local-only "mail" setup. The package install set up some sensible default. (Maybe it prompted me to accept the settings; I don't remember). EDIT: In Debian 9 and above, exim4-daemon-light is no longer installed as part of the Debian "standard task" (package set). The main reas...
Ubuntu Desktop 18.04 does not include cron. If you do install cron, it will not automatically install a mail transport agent. The Ubuntu cron package no longer "Recommends" any "mail transport agent" packages. (This feels like another inconsistency, as the package description for cron still says "you should probably ...
cron mail on Ubuntu?
1,283,180,111,000
I have a mail system set up on my server (Postfix + Dovecot) that I use for personal and sys-admin email. Every time I login via shell (for all of my accounts), the message "You have old mail." is displayed below the MOTD modules I've configured. I can't delete or move (most of) my read mail elsewhere, but I'd like to...
It is probably generated by the PAM pam_mail.so module. Edit /etc/pam.d/login en comment out the line that looks like: session optional pam_mail.so standard Alternatively, keep the line but remove standard if it's there, and add nopen to the end. It may be necessary to do the same in the /etc/pam.d/sshd file. Se...
Hide "You have old mail" message when logging into shell?
1,283,180,111,000
I'm using mutt as email client. Specifically, this is my setup: Mail is stored at a remote hosting company. Mail is retrieved locally using OfflineIMAP. I have two mail accounts: one personal and one for work. Both use separate Maildirs/muttrcs/instances of mutt. I've been using abook as address book and in general ...
You definitely want to sync your contacts via CardDav (+calender via CalDav?). To sync up use vdirsyncer, it's basically the same what offlineimap is doing for mutt. Khard is a nice address book for your terminal which works with the synced up content. Of course you can combine mutt and khard to work together. If you ...
How to sync email contacts between computers for use in mutt?
1,283,180,111,000
I'm trying to use Mutt to send specific files in a folder. I have a folder titled "Image Cache" that, with a picture being taken every second, has 30 seconds of pictures in it. I would like to use Mutt to put 15 seconds worth of pictures into an email as attachments and send them to me. Each picture is around 30 KiB, ...
Since you're quoting "$FILES" you are passing a single string to the -a option. You have to pass individual files there. What you should do is to store the files in an array: it's the best way to handle multiple strings that contain whitespace. I assume your filenames don't contain newlines # read the output of `find...
Sending Specific Files With Mutt
1,283,180,111,000
I would like to setup sendmail to send out mail using an external smtp-server with authentication. I've searched for solutions, but can't seem to find what I need. There are several examples about ssmtp and using gmail as smarthost, but then I read that ssmtp is not for servers. For authentication I have: server: ma...
Edit your sendmail.mc and add: define (`SMART_HOST', `your.smarthost')dnl FEATURE (`authinfo')dnl Create the file /etc/mail/authinfo with content: AuthInfo:your.smarthost "U:username" "P:password" Make new sendmail config: If you have sendmail-cf package installed: make -C /etc/mail Otherwise cd /etc/mail m4 ./s...
Centos - Sendmail smtp smarthost with authentication
1,418,997,015,000
We are running postfix with single domain (example.com) currently and we have appropriate PTR record for that. Now we want to add one more domain but i want to isolate that domain totally, Even i want to isolate PTR record too. so we added new public IP address in same server and added PTR entry to abc.com example....
Following should work for postfix equal or higher than 2.7. You need to modify /etc/postfix/master.cf, change the line smtp inet n - n - - smtpd to something like this: domain1 unix - - n - - smtp -o syslog_name=postfix-mail.example.com -o smtp_helo_name=mail.example.com ...
postfix virtual domain on specific IP address
1,418,997,015,000
I've just installed apticron to get mails as available update notifications. Now I was wondering if there was a way to set up mutt to manage my mails from /var/spool/mail/daedalus? I'm on Debian Jessie, if that is relevant.
You can set up the mailbox(es) to use in mutt via ~/.muttrc. It would be something like this (see the manpage for muttrc for the full details): set folder=/var/spool/mail set mbox=+daedalus
How use mutt to manage /var/spool/mail/user
1,418,997,015,000
I am curious as to how the mail command works. My computer has postfix server installed by default with red hat and is connected to a network that includes a mail server. I had assumed that when I tried to send an email with the mail command it would fail and bounce the email back to me with a message like "Can't deli...
My computer has postfix server installed by default with red hat That's basically your answer right there: RedHat included a default configuration with Postfix, sufficient for it to deliver mail. How to route email is published in DNS (it doesn't just turn host names into IP addresses); most likely your machine's P...
How does the mail command work?
1,418,997,015,000
I currently have Postfix relaying multiple hosted customer solutions which all works as expected. There are no local accounts and it is used solely as a relay server. In the config I have the following: mydomain = hostdomain.com myorigin = $mydomain In email headers sent from the relay the following lines are seen: R...
You could run multiple postfix instances, one for each customer. This would require either separate IPs or separate ports, separate queue directories, etc. Otherwise, no - this is not how it works. And it's not as if their recipients will be looking at the headers anyway, most people won't even know how to find them,...
Postfix Relay Multiple Domains with Multiple Origins
1,418,997,015,000
I have a simple procmailrc recipe that hands mail off to a script: LOGFILE=/home/foouser/procmail-log VERBOSE=yes MAILDIR=/var/spool/mail/foouser DEFAULT=/var/spool/mail/foouser SHELL=/bin/sh DELIVERED=yes COMSAT=no :0 | `/home/foouser/scripts/footool/footool.sh` The script itself is pretty resilient and reasonably...
This invocation is incorrect, unless you're somehow trying to run a command whose name is the output of footools.sh: :0 | `/home/foouser/scripts/footool/footool.sh` This is normal syntax: :0 | /home/foouser/scripts/footool/footools.sh procmail will execute footools.sh and pass the email to the script on stdin. No n...
What's the safest way to pipe an email to a script via procmail?
1,418,997,015,000
I need a sample file where mail utility stored messages. What I mean is: Return-path: <[email protected]> Received: from anton by nflogs.domain with local (Exim 4.80) (envelope-from <[email protected]>) id 1VuiP9-0006js-Fa; Sun, 22 Dec 2013 19:45:11 +0700 To: [email protected] Subject: test Cc: [email ...
The files located at /var/mail/username are in a format called mbox. You can read more about this format on the Wikipedia page titled: mbox. excerpt of format From MAILER-DAEMON Fri Jul 8 12:08:34 2011 From: Author <[email protected]> To: Recipient <[email protected]> Subject: Sample message 1 This is the body. >Fro...
What format is the file /var/mail/username mail utilities
1,418,997,015,000
I want to send emails from my work computers so that I can notify myself when various long-running tasks are completed. As I understand it, the command below looks up bar.com's MX record, makes a connection to the mail server and does SMTP to send the message: echo “Hello world” | mail -s “Hello world” [email protecte...
There is no difference between sending mail via the mail command or via any other program. As such a mail send via mail (1) is not more nor less likely to be identified as spam. ( I would add that this is the default way in which many non-cron tasks send you their mail, but I have no evidence to back that up. ) As to ...
what are the caveats of sending email via the "mail" command?
1,418,997,015,000
OK so I have mutt installed. But can't properly configure my hotmail acccount. I need some sample for hotmail configuration.
Mutt can optionally be built with SMTP, POP3 and IMAP4 support. Most mainstream distributions probably do build it that way. It looks like Hotmail allows POP3 access to e-mail, which certainly makes things easier. In that case, you'd probably be looking at setting up $pop_host and perhaps its friends if you want to us...
Using mutt to fetch email from hotmail?
1,418,997,015,000
I can't send mail to external email addresses such as gmail. When I try to send a mail with telnet I get the following error: Trying 130.xx.xx.128... Connected to mydomain.com. Escape character is '^]'. 220 server2.mydomain.com ESMTP Postfix mail from: [email protected] 250 2.1.0 Ok rcpt to: [email protected] 554 5.7....
The key to understanding your problem is the following two lines. smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination mynetworks = 127.0.0.0/8 [::1]/128 mynetworks lists only localhost, and there i...
Postfix error: Relay access denied
1,418,997,015,000
How can I modify the following so that it reads maildir and not just mailbox format? typeset -a mailpath for i in ~/Mail/Lists/*(.); do mailpath[$#mailpath+1]="${i}?You have new mail in ${i:t}." done Currently, I get: /home/XXX/.zshrc:77: no matches found: /home/XXX/.Mail/Lists/*(.)
You need to enumerate the directories called new under ~/Mail/Lists/. It's just a matter of a few glob qualifiers: / to match directories, and maybe N so that the expansion is empty if there is no match. Use ${i:h:t} to show the name of the mailbox instead of new. for i in ~/Mail/Lists/**/new(/N); do mailpath+=("${i...
zsh notification of email (in maildir)
1,418,997,015,000
I am on Debian squeeze and I'd like to forward my root emails to my real email. I setup exim to use gmail so when I write mail [email protected] it sends to my email. However, now I'd like to email root and have it forward my emails to my real email address. mail root does not send an email to root. If I create a diff...
In order to forward root's e-mails to another e-mail address, you could change the line related to root in the file /etc/aliases. For instance: root: [email protected] To forward e-mails of a UNIX user (let say myuser) to another e-mail address ([email protected]), had the file .forward in the home folder of myuser. ...
How do I email root?
1,418,997,015,000
My Uni account is over disk quota and requesting more quota takes time. Unfortunately, I need disk space now and I noticed that the Trash file in my home directory is quite a large file. I’m assuming that this somehow relates to my mail inbox? (I do have some doubts, since although his file clearly contains email mess...
This Trash file is unrelated to Postfix. It's also probably not what you see over IMAP: while the IMAP server could be configured to serve this file as a mail folder called Trash, it's likely that it's showing a directory called Trash near other directories that you see over IMAP. The mail you show is an oddity of Pin...
Can I safely delete ~/Trash file?
1,418,997,015,000
I have been using mutt for a while and got it to work pretty well with 2 gmail accounts. I have 2 macros set to switch from one to the other. wanting to move to neomutt, the exact configuration is not working anymore. I can get to my account individually, but I can't swapp from one to the other. neomuttrc: source ~/....
the trick was to set folder = "imaps://[email protected]" having the same folder for the mailboxes was confusing neomutt.
Neomutt Multi account
1,418,997,015,000
As part of a script, I want to take a file containing an email and extract a header, e.g., the subject header. The following almost works: formail -c -x subject < FILE But it does not decode headers encoded using the MIME encoded-word syntax (aka RFC2047), e.g., =?UTF-8?B?w6lsw6ltZW50?=. What's a nice way to extract ...
pipe it to: python) formail -c -x Subject < FILE | \ python -c "from email.header import decode_header; import sys; text, encoding = decode_header(sys.stdin.read())[0]; print text.decode(encoding)" php) formail -c -x Subject < FILE | \ php -r 'echo iconv_mime_decode(stream_get_contents(STDIN),1,"utf-8");' or if yo...
Extract mail header and decode MIME encoded-word
1,418,997,015,000
Today I ran a clamscan -ri / and got some positives for some malware. Most are in the "spam" folder, so that's no problem. But one is among my saved e-mails: /home/user/.icedove/bfa059u1.default/ImapMail/imap.server.com/INBOX.sbd/saved: Doc.Dropper.Agent-1552723 FOUND "Icedove" is Debian's rebranded Thunderbird. "sav...
Make a copy of your mbox to Maildir format, for example using this Perl script or the terminal mail client mutt(1). Then clamscan that maildir – as each message is stored in a separate file in the maildir format, you'll be able to identify the offending message and hence be able to remove it from your original mbox .....
How to find out which particular e-mail in Thunderbird/Icedove that contains malware Doc.Dropper.Agent-1552723 pointed out by Clamscan?
1,418,997,015,000
A remote CentOS 7 web server is able to successfully receive email sent from elsewhere on the internet addressed to [email protected] . An app running on the same CentOS 7 server is able to use JavaMail to make an IMAP connection to the dovecot Maildir where the incoming messages get stored. So what do I have to add...
After some back-and-forth through comments and chat the OP's problem is now resolved. The IMAP server needed to be specified as imap.mydomain.com instead of mydomain.com although for some reason this only worked when set using the advanced account settings, not using the account creation dialog box. In addition to men...
unable establish remote imap connection, why not?
1,418,997,015,000
The way I do it now is that I have to keep a 'Gmail' tab open at all times in my browser to check for new mail. My mails are important and I need instant notifications. I thought of using a client like 'Thunderbird' but it feels to "heavy" for my needs. All I need is instant notifications of a new mail received in my ...
Using a browser add-on is one option, if you've got your browser open doing something anyway. Or a desktop panel app could notify you when new mail arrives. Like "Xfce4 Mailwatch Plugin" (if you're using XFCE, or like it, can do multiple inboxes) or "gnome-gmail-notifier", there should be several available from search...
Gmail instant new mail notifier for Debian 7 systems?