LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   sendmail local no relay (http://www.linuxquestions.org/questions/red-hat-31/sendmail-local-no-relay-242439/)

kcpant 10-14-2004 01:32 AM

sendmail local no relay
 
Hi all,

I'm using sendmail with MailScanner+clamav as mail server. All things working fine, but one thing, my local mails also getting routed through Smart Relay host. I know that if I 'm using a Smart relay, all mails not destined for any of class w names, will be routed through it. but , for a practical use, I need a solution for it.

In detail, we have purchased some mail accounts from our ISP, on a virtual domain. we use SMTP server of this ISP as Smart relay. mails from outside world goto the ISP , from where we fetch them on sendmail server by using fetchmail.at my end, I've also made a virtual domain of the same name for which we have purchased mail accounts.Now, if I add this virtual domain's name in /etc/mail/local-host-names file, mails sent to users on virtual domain are treated locally. this is fine, as long as my all users of that virtual domain are inside my own server and inside my LAN. But ,the practical problem is, some users having an account from my ISP are outside my LAN. they use their mail account of this virtual domain to access mails from different locations. now, when anybody from my lan sends a mail to these outside users, my mail server (sendmail) gives error "User Unknown".It is obvious because we don't have any mail account for that user in this server. instead, the accounts are handeled by ISP, as stated above.

So, can anybody tell me a way to solve this problem, means, on the same virtual domain, if mails send to local users, should be treated as local, and if the user is not found in user database, the mail should be relayed to smart host as other outbound mails....

In other way, anybody can tell me to alias non local users to local user account, than I will change my domain name ( delete virtual domain) and alias my virtual domain accounts to local accounts.

Please suggest me any way to tackle this..

thanks

DirtDart 11-27-2004 10:56 AM

Quote:


when anybody from my lan sends a mail to these outside users, my mail server (sendmail) gives error "User Unknown"

You need to add an entry into your /etc/mail/virtusertable file.

On my local box, mail I send comes from my ISP <myname@adelphia.net>, but non-local (users don't have an account on the server) gets sent to my ISP's mail server.

This is what I had to enter into my /etc/mail/virtusertable

Code:


@adelphia.net        %1@smtp.bur.adelphia.net


That should fix your "user unknown" problems.


All times are GMT -5. The time now is 07:25 PM.