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


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

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


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', `')
but it doesn't seems to work.

In help would be greatly appreciated.

Old 07-31-2009, 03:57 PM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,687

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
If you don't have many users you can setup /etc/mail/virtusertable like this:
user1@mydomain.tld user1
user2@mydomain.tld user2
userXmydomain.tld userX
@mydomain.tld catchall
Then rebuild virtusertable
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
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/ file. put following

this will tell sendmail to route all messages to catchall account which are destined for a user which doesn't exist on our server.


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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:49 PM.

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