LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-31-2009, 01:43 PM   #1
kingkashif
Member
 
Registered: May 2009
Posts: 94

Rep: Reputation: 16
Sendmail - Accept mails to unknown users and route specific user


Hello,

I need to instruct sendmail to accept mails that are destined to users that are not available on my server and then forward those emails to catchall@mydomain.tld.

Please remember that i don't want to forward every single mail to catchall user. I just want to forward those emails which would be destined for users that do not exist on my server.

i have used define(`LUSER_RELAY', `local:catchall@d.com')
but it doesn't seems to work.

In help would be greatly appreciated.


Thanks
 
Old 07-31-2009, 03:57 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you don't have many users you can setup /etc/mail/virtusertable like this:
Code:
user1@mydomain.tld user1
user2@mydomain.tld user2
...
userXmydomain.tld userX
@mydomain.tld catchall
Then rebuild virtusertable
Code:
makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable

Last edited by bathory; 07-31-2009 at 03:59 PM.
 
Old 07-31-2009, 05:23 PM   #3
kingkashif
Member
 
Registered: May 2009
Posts: 94

Original Poster
Rep: Reputation: 16
Thanks for your reply. But no that wasn't what i wanted.

@domain.tld catchall

this will send every single message to catchall account. That is also a great feature. But in my problem i wanted to only send those messages to catchall account which were destined to some unknown user/non-existent user on our server.

Fortunately i have solved that problem.

Here is what we should do.

In our /etc/mail/senmail.mc file. put following

Quote:
define(`LUSER_RELAY',`local:catchall')dnl
this will tell sendmail to route all messages to catchall account which are destined for a user which doesn't exist on our server.

Thanks.

Last edited by kingkashif; 07-31-2009 at 05:25 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My mail server bounce mails of unknown users. Can I stop it. ponganthony Linux - Server 6 11-08-2009 05:44 PM
How to force specific domain or user specific emails to proces in sendmail 8.13.5 FC5 peanutsa Linux - Newbie 1 03-22-2009 05:33 AM
Sendmail: how to relay mails from specific addresses zWaR Linux - Server 1 07-17-2007 05:48 AM
To forward mails for unknown users to common host fnetindia Linux - Software 2 09-22-2003 10:53 PM
How do I auto delete mails from a specific domains/users? markng Linux - Security 4 05-02-2002 10:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration