1827882 Members
1131 Online
109969 Solutions
New Discussion

sendmail configuration

 
kcpant
Trusted Contributor

sendmail configuration

hi all,

at first , I'm sorry to say that nobody is able to answer satisfactorily to my previous question:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=707546

only steven have tried to answer it, but the answer was not for what I want to know.

Now, I have a new problem, to the same context. I have a domain , say xyz.net, for which I've subscribed some email accounts from an ISP. I use that ISPs smtp as a smart host in sendmail. mails are working properly, except the intermittant "relaying prohibited" messages, as Idescribed in previous thread.now, I want to create some internal mail accounts on the same domain. So, my question is, does it work without making any change to exsisting mail configuration, or I've to change something to get internal mailing to work? let's say, one user is abc@xyz.net ,for which I've an email account purchsed through ISP,so mails relayed to this user through smart host. Now, I've another user bcd@xyz.net, which is an internal user only and intented to prticipate in internal mailing. so, what has to be configured to get it working?..means, some users mail on the same domain work through smart host, and some other internal user's mail through local sendmail only....
PreSales Specialist
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

I'm going to try and give this over in a different way so maybe it helps more. sendmail.org is a big site and does a better but less concise job.

Important sendmail files

/etc/mail/senemail.mc

Contails macro files.

You will need entries in it to support multiple domains. This will probably need to be on both servers.

DAEMON_OPTIONS(`Port=smtp,Addr=192.168.0.41, Name=MTA')dnl

You'll need to cover every public and private ip address you wish to bind to your semdmail configuration. Miss one and you can get intermittant failures. Have one that isn't a local ip and sendmail can't send mail.

Be careful

Same file

Cwxyz.net
Cwxfz.net

Cw is required every domain supported or relayed must be included.

#may not be needed. I put it in and it doesn't seem to hurt.
MASQUERADE_DOMAIN(xyz.net)dnl


/etc/mail/access file

127.0.0.1 RELAY


Must include EVERY IP address or hostname you want to be able to relay mail. Miss one and you get intermittant errors. Have an extra and you may be vulnerable to open relay on the Internet.


/etc/mail/virtusertable
abc@xyz.net abc


/etc/mail/genericstable
abc abc@xyz.net

Those two tables are the opposite of one and other. They provide rervse email address name resolution.

Once again, if you are missing entries this can lead to inconsistent performance of teh sendmail transfer program both for inbound and outbound mail.

The buildmail script attached to the prior post will take these configuration files and build a new sendmail.cf file It will also restart the sendmail daemon.

SEP



Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kcpant
Trusted Contributor

Re: sendmail configuration

thanks for reply steven, but my doubts are still not cleared :

" You will need entries in it to support multiple domains. This will probably need to be on both servers."


what do you mean by supporting multimple domains, in my context, I will not have two different domains for internal & external domains.both type of users are on same domain, and same server. so, I'm not able to understand "multiple domain & both server" things you have written here.I simply need is, the mails for users who have an ID purchsed through Mail ISP, should get mails routed through ISP's SMTP, and the mails of users who have only internal ID should work through local SMTP of sendmail.when a user of first type ( having external ID) sends mail to internal users, it should not routed to ISPs SMTP, rather it should be delivered by local SMTP.
PreSales Specialist
Alexander Chuzhoy
Honored Contributor

Re: sendmail configuration

Try the following:
1. edit /etc/mail/local-host-name
and append a line with
xyz.net
so that the sendmail will be able to get the mail of xyz domain.
2.edit /etc/mail/virtusertable
someone@xyz.net localuser

where localuser is the username of the local user (of course).
3.Restart the sendmail service.
Now you should handle e-mail for someone@xyz.net locally,i.e. not to send it to smart host.
Steven E. Protter
Exalted Contributor

Re: sendmail configuration

If you have more than one server that handles sendmail tranfer in and out of your organization or have some kind of fault tolerance, high availability or such setup, all entries in the prior post for virtusertable and genericstable must be on all/both servers. You'll need to generate macros off your sendmail.mc file using the script I provided in a prior post or the script recommended at sendmail.org.

Leaning the intracies of sendmail configuration, which is really what both posts is about is not something you are going to learn in one set of itrc forum posts. Look back at my own question history. There are a dozen questions focusing on various aspects of sendmail.

The basic approach should be to test a user setup inbound and outbound while monitoring the /var/log/maillog file with a tail -f command. The errors will usually point to the problem. Gradually you'll diagnose specific issues or create itrc forums threads for discreet problems.

The replies have been broad because the question has been. No configuration files have been provided.

If you provide error text from /var/log/maillog and scrubbed copies of the configuration files in /etc/mail and maybe /etc/aliases this problem can be identified and corrected.

Or you can bring in someone to look at the files and teach you the interelationships.

Regards,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kcpant
Trusted Contributor

Re: sendmail configuration

hi steven,

thanks for your valuable suggestions, I'm going to work on this project this week, and I will post whenever I'll face any kind of problem...( I think I shouldn't face any, just have some hasitation on the concept that , in the same domain and same server, some users can be outbound and some only inbound...).

thanks...
PreSales Specialist
kcpant
Trusted Contributor

Re: sendmail configuration

closing thread
PreSales Specialist