I found this handy little site to send yourself a harmless test virus.
Tag: mail
Some useful commands when working with a postfix mailqueue:
- “postsuper -r ALL”. Requeues all messages.
- “postcat [file]”. Views queue files in /var/spool/bla.
- “postqueue”. Deal with queue.
mailq | tail -n +2 | grep -v '^ *(' | awk 'BEGIN { RS = "" } { if ($8 == "person@example.com" && $9 == "") print $1 } ' | tr -d '*!' | postsuper -d -
I believe there were more, but I can’t remember them. Wish I had blogged earlier…
Sometimes automated services or people need to contact some domain administrator for a certain domain. There are a couple of addresses that should be present by default. Google uses these addresses to notify you when they put you on their malware blocklist:
- abuse@
- admin@
- administrator@
- contact@
- info@
- postmaster@
- support@
- webmaster@
I think I need these for my domains to be present by default:
- abuse@
- postmaster@
- hostmaster@
- webmaster@
- root@
A very common way to configure Exim on a Debian machine, is to make it a ‘satellite’; a server which uses another SMTP server for sending and does not do local delivery, the latter being the difference with a ‘smarthost’. It can be used by other computers in the network to send mail, but also by the machine itself, to send system notifications and such (one of my favorite apps, arpwatch, for example).
The following needs to be in /etc/update-exim4.conf:
dc_eximconfig_configtype='satellite' dc_other_hostnames='[mailname]' dc_local_interfaces='' dc_readhost='' dc_relay_domains='*' dc_minimaldns='false' dc_relay_nets='' dc_smarthost='[your SMTP server]' CFILEMODE='644' dc_use_split_config='false' dc_hide_mailname='false' dc_mailname_in_oh='true' dc_localdelivery='mail_spool'
The following needs to be in /etc/mailname:
[mailname]
[mailname] is the same in both locations, and is simply the FQDN (world wide, not just local, such as bla.net) which should appear after the @-sign. The reason that it must entered in both places, is because both have a different function. ‘etc/mailname’ Takes care of putting the specified domain after the @-sign if you mail to, for example, root. The ‘dc_other_hostnames’ is to let the server know that this is the machine that handles that domain. If you don’t specify the ‘dc_other_hostnames’, the server will just try to send it to the next relay. BTW, ‘dc_other_hostnames’ is colon (;) seperated.
Make sure the FQDN you use exists, otherwise a lot of mailservers refuse to accept it. What I don’t understand, though, is that in my experience, whatever you use as domain doesn’t have to exist as MX record, but just as an A record.
Also don’t forget to include an alias for root in /etc/aliases. I usually let all mail sent to root be sent to a local user, and alias that local user to an outside e-mail address.
Recent Comments