#Mail

6 posts tagged Mail

Mastodon server: email

· linux, software

Always a hassle to get mail delivery to work.

Had a similar problem with a VoIP (Nexmo SMS/call forwarding) tool that just refused to work using local mail servers without a valid cert. Gave up and started using Mailgun. 

Long story short: use something like Mailgun or another provider.

Using localhost SMTP server support seems to be limited if you don't have working certs. The documentation is also lacking as to what does what. Didn't figure out how to have it ignore SSL.

Postfix & Courier & Letsencrypt

· linux, networking, software, www

First of all, create your certificates (the regular way). I created one with multiple domains: webmail.rootspirit.com, mail.rootspirit.com, smtp.rootspirit.com.

In my case, as the mailserver and webserver are behind a proxy (postfix, imap, Roundcube Webmail), I create the certificate on the proxy (nginx) and scp the cert to the mail server. All this is automated with a tiny script.

For Postfix, edit main.cf and change/edit/add these lines (check the right path too!):

smtpd_use_tls = yes
smtpd_tls_key_file = /etc/ssl/letsencrypt/webmail.privkey.pem
smtpd_tls_cert_file = /etc/ssl/letsencrypt/webmail.fullchain.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_exchange_name = /var/run/prng_exch
tls_random_source = dev:/dev/urandom
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDB3-SHA, KRB5-DES, CBC3-SHA
smtpd_tls_dh1024_param_file = /etc/ssl/postfix/dhparams.pem
smtpd_tls_auth_only = yes
smtp_tls_security_level = may
smtpd_use_tls=yes
smtpd_tls_security_level=may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_loglevel=1
smtp_tls_loglevel=1

And restart postfix: /etc/init.d/postfix restart

Postfix delete mails from/to one address

· google, linux, networking

Monit suddenly sending 18.000 e-mail? Gmail blocking your mx IP & getting all other incoming emails to your Gmail account (as it's getting forwarded to Gmail) delayed?

Have no fear...

mailq | grep monit@hawk-62e9e0.botnet.corp.flatturtle.com | cut -d' ' -f1 | xargs -rn1 postsuper -d

Edit the e-mail address.

Note: mainly a reminder for myself. ;)

Courier IMAP and auto deleting trash after 7 days

· apple, errors, linux, networking, software

E-mails that had been deleted for over 7 days were automatically removed from the IMAP server. E-mail date was ignored (ie the mail could have been from 2010; the actual time in “Trash” counted). This didn’t happen to other folders (Sent, Archive, Spam). This recently happened and hadn’t happened before.

I had to restore my trash folder from backups every 7 days (yay for rdiff-backup).

It took me a while to figure it out… The problem first appeared in October, right after several big changes:

Postfix + maildrop + recipient_delimiter

· errors, linux, software

I suddenly noticed issues with Postfix not accepting e-mails that are tagged (“user+TAG@fqdn”) anymore. Even though it always had.

Postfix main.cfg:

recipient_delimiter = +

Log snippet:

Apr 16 13:07:52 vm-dns-mail postfix/pipe[6119]: 55D1C2005E4: to=<user+test@rootspirit.com>, 
relay=maildrop, delay=0.06, delays=0.01/0/0/0.05, dsn=5.1.1, status=bounced 
(user unknown. Command output: Invalid user specified. )

Tried to find what’s wrong in MySQL, change the delimiter, Debug Maildrop, etc. Not much progress… :( And after 6 hours I was starting to get annoyed.

Fixing GrowlMail with Mac OS X 10.6.7 and Mail 4.5

· apple, errors, software

Add following two lines to Info.plist:

<string>9049EF7D-5873-4F54-A447-51D722009310</string>
<string>1C58722D-AFBD-464E-81BB-0E05C108BE06</string>

Between

<key>SupportedPluginCompatibilityUUIDs</key>
<array>

And

</array>

You can find the Info.plist in:

~/Library/Mail/Bundles/GrowlMail.mailbundle/Contents/

Or