MX records & how to fetch / resubmit to the original mail server
Hi, I know that I can setup different MX records for the mail exchange, but how do I resubmit or fetch the mails to the original mail server automatically, as soon as this server is available again? bye Ronald Ronald Wiplinger (ÃQ¤¯¯Ç), CEO, ELMIT - The Solution Provider Tel. +886 2 8809-7680, Fax. +886 2 2809-0183, Mobile: +886 915 653-452 Net2Phone:8869550066, ICQ: 111651169 http://www.elmit.com http://www.wiplinger.org
hi ronald, what do you mean by "fetch / resubmit" ??? if one mail is sent out, and it can not reac the destination, it is returned to the sender. this can happen in a few hours, but can take serveral days also. changing a dns record takes usually 24-48 hours to propagate over the net. if you are lucky, some of the mails will reach the original server, but only if they are still underway to get delivered _and_ there will be again a request to a dns that knows about the new mx ..... otherwise : no go, i would say ..... greets, chris Am Montag, 26. November 2001 02:33 schrieb Ronald Wiplinger:
Hi,
I know that I can setup different MX records for the mail exchange, but how do I resubmit or fetch the mails to the original mail server automatically, as soon as this server is available again?
bye
Ronald
Ronald Wiplinger (ÃQ¤¯¯Ç), CEO, ELMIT - The Solution Provider Tel. +886 2 8809-7680, Fax. +886 2 2809-0183, Mobile: +886 915 653-452 Net2Phone:8869550066, ICQ: 111651169 http://www.elmit.com http://www.wiplinger.org
-- visit me at http://mamalala.de
* Ronald Wiplinger (ronald@elmit.com) [011125 17:29]:
I know that I can setup different MX records for the mail exchange, but how do I resubmit or fetch the mails to the original mail server automatically, as soon as this server is available again?
If I understand your question, you shouldn't need to do anything other than flush the mail queue (sendmail -q, postfix flush, killall -ALRM qmail-send). The mta should then immediately try to get the mail to the next-higher-precedence MX (which may not necessarily be the most preferred one). -- -ckm
At 06:28 ¤U¤È 2001/11/25 -0800, Christopher Mahmood wrote:
* Ronald Wiplinger (ronald@elmit.com) [011125 17:29]:
I know that I can setup different MX records for the mail exchange, but how do I resubmit or fetch the mails to the original mail server automatically, as soon as this server is available again?
If I understand your question, you shouldn't need to do anything other than flush the mail queue (sendmail -q, postfix flush, killall -ALRM qmail-send). The mta should then immediately try to get the mail to the next-higher-precedence MX (which may not necessarily be the most preferred one).
Example: MX 0 mail.abc.com MX 10 mail-backup.abc.com MX 20 mail-backup.otherside.com It would mean, that the mails will come to mail.abc.com, except the server is down (or even overloaded), If so, the next mail server would be used: mail-backup.abc.com, of if the entire site has a problem the mail-backup.otherside.com And there they are !!!! and there they stay !!!! However, the normal user is not checking mail-backup.abc.com or mail-backup.otherside.com Actually, I not even want that the mails on these machines would be sort in into mailboxes for the users, ... it should be just here in a queue to delivery to mail.abc.com as soon as possible. bye Ronald
--
-ckm
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
Ronald Wiplinger (ÃQ¤¯¯Ç), CEO, ELMIT - The Solution Provider Tel. +886 2 8809-7680, Fax. +886 2 2809-0183, Mobile: +886 915 653-452 Net2Phone:8869550066, ICQ: 111651169 http://www.elmit.com http://www.wiplinger.org
On November 25, 2001 10:22 pm, Ronald Wiplinger wrote:
At 06:28 ¤U¤È 2001/11/25 -0800, Christopher Mahmood wrote:
* Ronald Wiplinger (ronald@elmit.com) [011125 17:29]:
I know that I can setup different MX records for the mail exchange, but
how
do I resubmit or fetch the mails to the original mail server
automatically,
as soon as this server is available again?
Example:
MX 0 mail.abc.com MX 10 mail-backup.abc.com MX 20 mail-backup.otherside.com
It would mean, that the mails will come to mail.abc.com, except the server is down (or even overloaded), If so, the next mail server would be used: mail-backup.abc.com, of if the entire site has a problem the mail-backup.otherside.com
And there they are !!!! and there they stay !!!! However, the normal user is not checking mail-backup.abc.com or mail-backup.otherside.com Actually, I not even want that the mails on these machines would be sort in into mailboxes for the users, ... it should be just here in a queue to delivery to mail.abc.com as soon as possible.
You need to setup the two backup servers to send forward any mail for mail.abc.com on . I think you need to edit /etc/mail/mailertable and rebuild it. But it's getting late. Nick
* Ronald Wiplinger (ronald@elmit.com) [011125 19:18]:
MX 0 mail.abc.com MX 10 mail-backup.abc.com MX 20 mail-backup.otherside.com
It would mean, that the mails will come to mail.abc.com, except the server is down (or even overloaded), If so, the next mail server would be used: mail-backup.abc.com, of if the entire site has a problem the mail-backup.otherside.com
In general, something sort of like that will happen. But MTA's aren't currently required to this by RFC although I don't know of one that doesn't (I'm not counting silly clients that have built-in MTAs...who know what they do). For example, qmail (which we use for these mailing lists) is much less agressive about trying secondary MXs than, say, sendmail.
And there they are !!!! and there they stay !!!! However, the normal user is not checking mail-backup.abc.com or mail-backup.otherside.com Actually, I not even want that the mails on these machines would be sort in into mailboxes for the users, ... it should be just here in a queue to delivery to mail.abc.com as soon as possible.
Ah, I think I see. Either you've given mail.abc.com and mail-backup.abc.com the same MX record or you've misconfigured the MTA on mail-backup.abc.com so that it thinks mail destined for mail.abc.com is also destined for itself. You don't say what the MTAs in question are but if it's sendmail, postfix, or qmail you'll probably want to have a look at the docs (for sendmail it's the "Bat" book from O'reilly, qmail www.qmail.org, and postfix www.postfix.org). You'll need to resend all of that mail from mail-backup.abc.com back to mail.abc.com though...something like formail -s sendmail foo@mail.abc.com < foo.mbox will work for mboxes. -- -ckm
It would mean, that the mails will come to mail.abc.com, except the server is down (or even overloaded), If so, the next mail server would be used: mail-backup.abc.com, of if the entire site has a problem the mail-backup.otherside.com
And there they are !!!! and there they stay !!!! However, the normal user is not checking mail-backup.abc.com or mail-backup.otherside.com Actually, I not even want that the mails on these machines would be sort in into mailboxes for the users, ... it should be just here in a queue to delivery to mail.abc.com as soon as possible.
I did a postfix install with the following /etc/postfix/main.cf on the backup mail server. I guess it can be shortened much more, down to just a few lines, but I'm no expert there. Works for me. --- Snip --- myhostname = mail-backup.abc.com relay_domains = $mydestination abc.com smtp_recipient_restrictions = permit_mynetworks check_relay_domains message_size_limit = 50000000 queue_run_delay = 100 maximal_queue_lifetime = 31 minimal_backoff_time = 100 maximal_backoff_time = 40 qmgr_message_recipient_limit = 1000 mail_spool_directory = /var/mail canonical_maps = hash:/etc/postfix/canonical virtual_maps = hash:/etc/postfix/virtual relocated_maps = hash:/etc/postfix/relocated smtpd_sender_restrictions = hash:/etc/postfix/access transport_maps = hash:/etc/postfix/transport masquerade_exceptions = root queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/lib/postfix mail_owner = postfix myorigin = abc.com masquerade_domains = abc.com mydestination = $myhostname, localhost.$mydomain defer_transports = disable_dns_lookups = no relayhost = mail.abc.com ---- Snip ---- /Stefan
participants (5)
-
Christian Klippel
-
Christopher Mahmood
-
Nick Zentena
-
Ronald Wiplinger
-
Stefan Nilsen