Solved

postfix - how to deliver all mail to unknown addresses to specific IMAP user

Posted on 2004-09-22
5
672 Views
Last Modified: 2012-05-05
I have postfix running with delivery to CyrusIMAP via LMTP.

I wish to have all incoming email which is not destined to a specific user which resides on the system to be sent to one individual user instead of being rejected.

I have found the following URL which describes how to do it.
http://www.seaglass.com/postfix/faq.html#fwdnex
However when I have implemented it, it does not work and I get the following error:-

Sep 22 15:06:51 laelaps postfix/lmtp[2300]: BBFB62654B: to=<dwreerereere@philtanner.homelinux.net>, relay=/var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp], delay=1, status=bounced (host /var/lib/imap/socket/lmtp[/var/lib/imap/socket/lmtp] said: 550-Mailbox unknown.  Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown (in reply to RCPT TO command))

In the main.cf configuration file it has the following comment about luser_relay :-
"# luser_relay works only for the default Postfix local delivery agent."
I guess this is the problem.

How can I get this working?
0
Comment
Question by:grblades
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 12123731
It seems to me that you'd do this in Postfix exactly the same way one would do it in Sendmail. And that is to treat all of the email addresses as if they were a virtual domain, which allows the use of a "catch all". See the Virtual domains docs at http://www.postfix.org/VIRTUAL_README.html
0
 
LVL 17

Expert Comment

by:owensleftfoot
ID: 12128183
set luser_relay = address-to-catch-invalid-users in main.cf
0
 
LVL 36

Author Comment

by:grblades
ID: 12130983
owensleftfoot - I have already tried that as I said in my first post but as you can see from the error I posted postfix passes the email onto lmtp so it does not use its own local delivery system so cannot tell if the email can be delivered or not.
Maybe I could add something to the local recipient map which lists all the valid users. If the user does not match this list then it will be sent to the luser_relay user?

jlevie - Thanks. I will have a look at that link.
0
 
LVL 36

Author Comment

by:grblades
ID: 12523084
Still working on this. Should have time to get back to it soon.
0
 
LVL 36

Author Comment

by:grblades
ID: 12658501
Thanks. I don't know when I will have time to look into it (its for a friend) but that approack looks as if it will work.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question