Fetchmail, Postfix user unknown in local recipient table

Hello all --

My fetchmail job has been failing to get mail to my mailbox with this error:
----
SMTP error: 450 4.1.1 <username@localhost>: Recipient address rejected: User unknown in local recipient table
----
(I replace my actual user name with "username")

The problem goes away temporarily if I stop and restart postfix, but it comes back almost immediately.

I'm having a hard time finding any clues in postfix's log. I'm not too sure what to look for, and it's pretty voluminous!

Any suggestions?

PowerMac G5 1.8x2, Mini Intel, Mac OS X (10.5.2)

Posted on Feb 23, 2008 6:39 AM

Reply
6 replies

Feb 23, 2008 9:33 AM in response to AlanNYC

Adding

local recipientmaps =


to /etc/postfix/main.cf and reloading postfix will stop the messages.

As a courtesy, do this only if your postfix server is not accepting SMTP for the wider Internet (LAN-only) or if you have a default fallback address for email sent to the IP/domain on which your postfix server runs.

Basically, telling postfix not to reject mail for unknown users will not cause problems if you have set up your system to have a catch-all user defined by "luser=" or if you are using virtual aliasmaps and have catch-all users defined for each domain for which you are accepting mail. Otherwise, you might generate "backscatter," notices sent to email addresses that have been forged by worms and viruses.

Feb 23, 2008 9:14 PM in response to mistersquid

Thanks Mister Squid.

I'm parsing your language carefully.
I don't just want to "stop the messages". I want my mail properly delivered.
If I turn off local recipient checking, will I actually get my mail?

Context: I run fetchmail to grab my mail from a POP server, run it through spamassassin, append it to /var/mail/username, and then serve it out via IMAP.

(Unfortunately, between a small volume of proper mail and very effective spamassassin, it's hard for me to reliably check changes I make to main.cf, and I find it's documentation absolutely confusing.)

Feb 24, 2008 4:43 AM in response to AlanNYC

AlanNYC wrote:
...........
If I turn off local recipient checking, will I actually get my mail?
...........


Yes, all email properly addressed should be delivered to you without problems.

The line only affects improperly addressed email, in this case allowing them to be accepted instead of rejected.

Since you are running Spamassassin and an IMAP server, I suggest also using the line

luser=someone@server.domain


which will send all improperly addressed mail to the address specified by "someone@server.domain". This is what I meant by "catch-all" address.

If you find postfix giving you problems after adding the lines, simply delete them or comment them out by adding a hash mark to the front of the line, e.g.

#local recipientmaps =


Alternatively, you can simply make no changes and allow the log messages to accumulate. The messages mean that postfix is doing its job by rejecting email addressed to users that don't exist. The above steps allow you to receive mail addressed to anything@server.domain, where "anything" is any string allowed in an email address.

I assume you're testing your changes using a separate email account, but in case you're not: sign up for a free email account with any of a number of free email services (Gmail, Yahoo) and test your postfix install as you make changes using the free account.

Feb 24, 2008 4:55 PM in response to mistersquid

Thanks Mister Squid.

Actually, I think I did a lousy job explaining the situation.

I run Fetchmail to pull email from a single POP account. The fact that the mail got to my POP account is a pretty good indicator that it was addressed properly (i.e., to me@my mailprovider.com)

The fetchmail job fails even with properly addressed email. So it's not the error message in particular that bothers me. Hey -- I love messages!

The problem is that I don't get ANY email to my local mailbox. It just stays up on my service providers POP server. Fetchmail polls, parses every message, and for every message fails to deliver it to my local mailbox. I interpret the message to mean that Postfix doesn't recognize the local user specified in .fetchmailrc.

BUT the fetchmail process works just fine for a short time after I restart Postfix. After a couple runs, however, it starts spitting out that message for every email it parses.

I'll post back later with the entire output of a fetchmail session. Hopefully that will help to clarify the problem.

Feb 27, 2008 5:36 PM in response to mistersquid

HA! That's awfully thoughtful of you.

Last night, I changed my cron table so that the fetchmail job runs every ten minutes instead of every three. So far, the problem -- which had been dependable as the sun rising -- hasn't come back. So maybe the fetchmail job starting before the previous one finished somehow caused the problem?

This definitely did not happen in Tiger, but maybe Leopard changed something.

Anyway, I'll leave the thread open for a bit longer to see if someone can diagnose it more accurately.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fetchmail, Postfix user unknown in local recipient table

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.