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] 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. Code:
local_user1@domain.com local_user1 |
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! |
Quote:
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: local_recipient_maps = $alias_maps unix:passwd.byname This defines the location of the list of local users for whom we need to receive mail. That's all for main.cf. **** So Can you please provide me settings for sendmail ****** Thanks |
Hi,
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. Regards |
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 Thanks in advance. |
Quote:
If you want to use these options, make a backup of your sendmail.mc and sendmail.cf, then add: Code:
LOCAL_USER_FILE(`/etc/mail/localusers')dnl 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. Code:
define(`LUSER_RELAY',`mailer:smarthost.domain.com')dnl |
Thanks a lot ,... :hattip: You are really great man ... I did not get a chance yet to test in my environment but I hope this will definitly work...
Thanks a lot once again for your great help....:) |
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 ) ***** Any option in Sendmail?? Thanks in Advance. |
Quote:
Regards |
Thanks a lot for all of your help...:)
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. |
Quote:
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 define(`SMART_HOST', `[x.x.x.x]')dnl define(`LUSER_RELAY',`[x.x.x.x]')dnl 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.. Any help would be really appreciated. |
Hi,
You can try to add Code:
FEATURE(`preserve_luser_host') Also take a look at the logs to see what happens to your emails |
Quote:
Quote:
Quote:
Is it require seperate auth settings unknown local users as i did for SMARTHOST... |
Does smarthost knows how to handle those emails?
Can you take a look at smarthost's logs to see what happens with your mail? |
All times are GMT -5. The time now is 11:40 PM. |