Solved

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

Posted on 2004-09-22
5
650 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
  • 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
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 …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now