Link to home
Start Free TrialLog in
Avatar of ntcsendmail
ntcsendmail

asked on

Senmail store and forward mail queue

I am using sendmail as backup mail serevr ( store and forward ).
when my Primary server is down.All mails go directly to " backup mail server " .After a while when
Primary mail server comes up all mails are safely deliver from backup to primary.
 But when primary mail server is down. I have run command  " mailq " on backup mail serverbut i
havn't seen any mail in queue.
Where are all these mail stay in backup mail server.

Regards,
Faisal Ghulam
Avatar of jlevie
jlevie

Have you checked the mail logs to see if the backup actually received anything while the primary was down. The lack of any ouput from mailq would make me suspect that it isn't receiving any messages, perhaps because of a mis-configuration or a DNS MX problem.
Avatar of ntcsendmail

ASKER

For backup Mail server:

I have added all domain in " local-host-name " , " access"  and  " mailertable ".
I have made no entry in "relay-domains".
     Should i remove all domain entry from " local-host-name " ,  access " and use  "relay-domains ".

Regards,
Faisal Ghulam
I have seen loging of mail comming at " Backup Mail server ". like /var/mail/maillog.
But cannot see any mail in queue whwn running command " mailq ".

Regards,
Faisal Ghulam.
Go back and check /var/log/maillog carefuly. My guess is that you saw that a message(s) was received but didn't look further to see what happened to it. For the backup server to accept mail for your domain(s) it must believe that is the mail server for those domains, which you accomplished by including the information in local-host-names. However, since it is a backup server and the user accounts don't exist on the backup server you need to tell sendmail what to do with messages for your users that it receives. An easy solution is to add entries to virtusertable that forward everything to the real mail server, like:

@real-domain.tld    %1@pri-server.realdomain.tld
@sec-domain.tld     %1@pri-server.realdomain.tld
...

With out something like that I'm guessing that the backup server bounced the messages with a "no such user error" and that will be in the maillog.
I have hundred domain.Each domain has  " catch all" , "regular-user" account.
If i used " Virtusertable " instead of  " Mailertable ".Virtusertable works for " catchall and regular user "account because i have hundred user for each domain..
I am using " visnetic " as Primary Mail Server named " mail1.mail.com ".

 In maillog it shows that after reciving mail : unkown user and now mail is not forwarding to "Primary mail server".

should i use that entry in " virtusertable".

@domain1.com      %1@mail1.mail.com
@domain2.com       %2@mail1.mail.com.

Regards:
Faisal Ghulam.
 
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If the primary mail server is still down, %1 will cause a loop because it lookd for the MX for the domain and will come back to your backup server again, and then start another cycle untill the primary server is up. It' will make your backup server heavily loaded if you have mutiple domains with hundred users in each domain.
In Qmail you can specify the primary MX in your forwarding rule so it only will keep contacting the primary MX, not the secondary MX - your backup mail host. But in sendmail  I am not sure how to specify that. That actually remains a question for me too. Anybody can help?