how to allowing Unknown Local Recipients with sendmail via smarthosting
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to allowing Unknown Local Recipients with sendmail via smarthosting
Hi,
I am using sendmail on CentOS-5 and using 'smarthosting'.I want to allow users to send e-mail for users that are not exists in unix but are with SMART HOST.
Thanks
When i send mail i am getting "USER UNKNOWN ERROR".
Sombody have an idea how to resolve this....
You want your local users to send email to users that don't exist locally, but do exist on smarthost and also be able to send mail each other? If that's the case, then if you have a few users on smarthost, you can use /etc/mail/aliases
Code:
user1: user1@[x.x.x.x]
user2: user2@[x.x.x.x]
where x.x.x.x is smarthost ip. Don't forget to run newaliases afterwards.
If you have more remote users than local, then use /etc/mail/virtusertable (but you have to give also the domain) where you should list all your local users.
Thanks for the suggestion , Is there any way to automatic checking if some send mail to local mail server it first check if user exist local if not then forward mail to smarthost for delivery, because that user exist in ISP.
For example : abc@example.com sends mail to xyz@example.com
First check :xyz@example.com in local if not then forward mail to asusual
smart host where our domain registered actually and find the users and sendmail to actual receipent.
Is it possible to do something automatic like in windows based mail server Mdaemon.
Thanks for the suggestion , Is there any way to automatic checking if some send mail to local mail server it first check if user exist local if not then forward mail to smarthost for delivery, because that user exist in ISP.
For example : abc@example.com sends mail to xyz@example.com
First check :xyz@example.com in local if not then forward mail to asusual
smart host where our domain registered actually and find the users and sendmail to actual receipent.
Is it possible to do something automatic like in windows based mail server Mdaemon.
Thanks for yor great help!
Same is possible in postfix , for re-directing unknown local users to smarthost like below.
Mail can be sent two ways: directly to the mail server of the receiver or via the mail server of our provider. The second approach is better, in our case — we'll send all outgoing mail to our provider, letting the provider worry about where to send it. That's why the relayhost argument in the INTERNET OR INTRANET section is important. Its value should be the name of our ISP's mail server:
relayhost = mail.provider.net
In the REJECTING UNKNOWN LOCAL USERS section, uncomment the line:
If you don't want to use the aliases or virtusertable approach, but want to use a file that contains the (local) users you don't want to relay to the smarthost, then you have to rebuild sendmail.cf using the LOCAL_RELAY and LOCAL_USER_FILE options. You can take a look here about these options.
Thanks for another solutions ,but i read that doc i am not able to under-stand how to enable this option to use and forward my unknown local users mail to SMART-HOST where that users exists.
Could you please give me the right syntax how to add these lines in sendmail.mc
You can also arrange to relay all unqualified names (that is, names without @host) to a relay host. For example, if you have a central email server, you might relay to that host so that users don't have to have .forward files or aliases. You can do this using
define(`LOCAL_RELAY', `mailer:hostname')
The ``mailer:'' can be omitted, in which case the mailer defaults to "relay". There are some user names that you don't want relayed, perhaps because of local aliases. A common example is root, which may be locally aliased. You can add entries to this list using
LOCAL_USER(`usernames')
This adds users to class {L}; you could also use
LOCAL_USER_FILE(`filename')
I have never used these options, but from what I can understand from the above, sendmail will send any mail addressed to a username user (i.e. without the trailing @domain.com) to the host defined in LOCAL_RELAY, except those users that exist in LOCAL_USER_FILE.
If you want to use these options, make a backup of your sendmail.mc and sendmail.cf, then add:
NOTE
It looks like LOCAL_* is deprecated and you can achieve the same thing using LUSER_REALYso any mail to a user that does not exist locally will be sent to the host defined by LUSER_REALY.
If you do not mind , can you please let me know how to keep a bcc copy of all incoming / outing going mail in sendmail server.
I am using CentOS-5 ( Sendmail + SMART-HOST + fetchmail ) ??
****It is possible in postfix via in main.cf ( always_bcc = admin@example.com ) *****
If you do not mind , can you please let me know how to keep a bcc copy of all incoming / outing going mail in sendmail server.
I am using CentOS-5 ( Sendmail + SMART-HOST + fetchmail ) ??
I'm not going to answer to this one, because I don't like the idea, but you can take a look here at LQ, as I think that this was answered previously, or use google to search.
I just wanted to make my knowledge in sendmail for this as i know how to take backup for all incoming / outgoing in postfix. I tried to find out this option in LQ / google but could not get through.
Anyways Thanks a lot , recentl i joined this group and got valuable reply from you.
I just wanted to make my knowledge in sendmail for this as i know how to take backup for all incoming / outgoing in postfix. I tried to find out this option in LQ / google but could not get through.
Anyways Thanks a lot , recentl i joined this group and got valuable reply from you.
Hi,
I back to thi LQ again as i am facing problem to sending unknown local user mail to smarthost. My current settings in sendmail.mc is
When i send mail to unknown local user it shows me sent (OK) status but not actually getting mail at my smarthost server.but when i send mail from sendmail to gmail / hotmail i am getting email.. I thin this user relay settigns is not working for the same domain..
Still i am not getting email at my SMARTHOST server for the same domain.. for unknow local users...even status showing me sent (OK)
Is it require seperate auth settings unknown local users as i did for SMARTHOST...
Last edited by mail4vijay; 12-13-2009 at 04:49 AM.
Reason: edit msg
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.