cancel
Showing results for 
Search instead for 
Did you mean: 

Running my own mail server - what happens to mail when it's offline?

mgillespie
Grafter
Posts: 222
Registered: ‎08-04-2007

Re: Running my own mail server - what happens to mail when it's offline?

root@ubuntu:~# nslookup -type=mx mgillespie.plus.com
Server:        208.67.222.222
Address:        208.67.222.222#53
Non-authoritative answer:
mgillespie.plus.com    mail exchanger = 5 autoturn.plus.net.uk.
mgillespie.plus.com    mail exchanger = 20 mx.last.plus.net.
mgillespie.plus.com    mail exchanger = 1 mail.mgillespie.plus.com.
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Running my own mail server - what happens to mail when it's offline?

Hiya Mark,
As has been intimated above, your mail *should* be queued on Plusnet's 'Autoturn' server if yours is offline.
DIG is a nice way to check your MX (Mail Exchanger) records for your domain:
dig -t mx yourdomain.co.uk
this should tell you the MX records, and show their priority (lowest priority is first).
What happens is when a sending server tries to send you mail, it will retrieve the MX records, and try the lowest priority one.  If that is not available, it tries the next-highest MX host (which will be Plusnet's Autoturn server) etc. etc.
To 'dequeue' mail from the autoturn server, you need to periodically issue the following command:
finger postmaster@autoturn.plus.net
I set up a CRON job that issues the command (via a script) every 15 mins or so.  You can grab it from the Library
As to why spam is turning up in the spam mailbox - that *may* be because mail is being delivered to mx.last.plus.net, which *may* be running through the Ironport appliances.  However, I'm not sure if this is supposed to happen or not - might be worth trying to get it looked into.
HTH
B.
SteveA
Pro
Posts: 1,849
Thanks: 106
Fixes: 3
Registered: ‎17-06-2007

Re: Running my own mail server - what happens to mail when it's offline?

So if you are off line it will fall back to the next server which is PN.
Then once you are back up and running just finger the autoturn service and stored email will be delivered.
MrC
Grafter
Posts: 525
Thanks: 4
Registered: ‎17-07-2008

Re: Running my own mail server - what happens to mail when it's offline?

Yes with that setup your mail will be queued on PN's servers when your server is unavailable. They'll periodically try to send queued mail to your server, or you can force a dequeue by fingering the autoturn server as at http://www.plus.net/support/email/smtp_mail.shtml#autoturn.
itsme
Grafter
Posts: 5,924
Thanks: 3
Registered: ‎07-04-2007

Re: Running my own mail server - what happens to mail when it's offline?

PN's autoturn server does not periodically try to send, unless PN have changed it since the last time I used them. Emails will only be received by dequeuing using the 'finger' commend.
MrC
Grafter
Posts: 525
Thanks: 4
Registered: ‎17-07-2008

Re: Running my own mail server - what happens to mail when it's offline?

Oops you're quite right. Having re-read PN's help pages it does say you need to use finger postmaster@autoturn.plus.net to start a dequeue.
SteveA
Pro
Posts: 1,849
Thanks: 106
Fixes: 3
Registered: ‎17-06-2007

Re: Running my own mail server - what happens to mail when it's offline?

Barry, I'm wondering why you finger the autoturn every 15 minutes, it seems like a bit of over kill if your server is up and running all the time
zubel
Community Veteran
Posts: 3,793
Thanks: 4
Registered: ‎08-06-2007

Re: Running my own mail server - what happens to mail when it's offline?

it was for business continuity, mainly.
We did have a notoriously bad internet connection, (the Bt line ran practically through the factory which had lots of EM generating equipment in it) so dequeueing mails fairly frequently was a good idea.
B.
SteveA
Pro
Posts: 1,849
Thanks: 106
Fixes: 3
Registered: ‎17-06-2007

Re: Running my own mail server - what happens to mail when it's offline?

Ah, that explains it 😉