Solved

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

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Xymon customize http timeout 2 87
nagios remote hosts 9 56
Linux server had an unexpected freeze. How to find out cause (sys logs)? 13 37
centos commands 6 54
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

822 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