Closed Thread Icon

Topic awaiting preservation: postfix, fetchmail, mailman Pages that link to <a href="https://ozoneasylum.com/backlink?for=12729" title="Pages that link to Topic awaiting preservation: postfix, fetchmail, mailman" rel="nofollow" >Topic awaiting preservation: postfix, fetchmail, mailman\

 
Author Thread
Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-10-2003 19:31

Okay, Linux time.

I've got an ISP email account. The account as set as a "catchall" -- anything sent to a nonexistent user on my domain goes to that account.

I've got a Linux box. It can send and receive email as a client PC, but it's not a mail or web server on its own. I can point a browser at its IP, or I assume I could send email to user@123.456.7.890 and have it go through, but it doesn't have a DNS entry of its own. It thinks its name is eva.alanmacdougall.com, since all Linux PCs (seem to) need a fully-qualified domain name.

Here's what I want to do. I want to be able to send an email to jrandomluser@alanmacdougall.com -- this will result in the message appearing in catchall@alanmacdougall.com.

Then, I want to use fetchmail on my local Linux box to retrieve the email from the POP3 account catchall@alanmacdougall.com.

Finally, I want postfix to deliver the email locally IF a user (or alias) called jrandomluser exists, and forward the email to a different remote account if not.

My ultimate goal is to run a few mailman lists in this fashion. If someone sends mail to listname@alanmacdougall.com, I want that email to find its way to my local box for processing (since "listname" will be aliased to the appropriate mailman commands in /etc/postfix/aliases).

So far, I've only got part of the equation. If, from my local Linux box, I attempt to mail to a local user who doesn't exist, postfix forwards the email to noise@alanmacdougall.com, just as I want it to. And if I send mail to a remote user (anyone@alanmacdougall.com) who doesn't exist, the email does appear in catchall@alanmacdougall.com. However, when I use fetchmail to get the remote email, postfix isn't distributing it to the correct local users. It's not even bouncing it to noise@alanmacdougall.com, like it does with local incorrect mail.

Here's what I've done to get to this point:

In postfix's main.cf, I've turned off local_recipient_map and set "luser_relay = noise@alanmacdougall.com". This means that mail for nonexistent local users is bounced to noise@alanmacdougall.com, and it seems to be working.

In fetchmail, I've set all email from the catchall@alanmacdougall.com account to be handed to the local user or alias of the same name.

My actual .fetchmailrc says:

code:
poll pop3.alanmacdougall.com protocol pop3
localdomains alanmacdougall.com
aka alanmacdougall.com
no dns
user catchall/alanmacdougall.com there
with password mypassword
to * here
dropdelivered



(Note: the "catchall/alanmacdougall.com" notation is required by my ISP.)

Here's the problem: when I run fetchmail in test mode, fetchmail finds messages on catchall@alanmacdougall.com, and seems to say that it delivers them to the appropriate account (username@alanmacdougall.com)... but then the local account doesn't actually get the email. And, well, that's where I'm stuck. Up until now, I've been getting a steady flow of error messages or whatnot that I could Google around on, but with this iteration of my problem there's not much to go on.

Any of our sysadmin types (*coughpugzlycough*) have any idea?

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-11-2003 14:53

Well, I'm making progress... now my problem seems to be more postfix than fetchmail.

I can receive emails and distribute them to local users, because postfix's main.cf has mydestination: alanmacdougall.com, eva.alanmacdougall.com.

This means that if incoming mail is for foo@alanmacdougall.com, it'll be delivered locally, like I want.

The trouble is that if I try to mail something to foo@alanmacdougall.com, it'll be delivered locally. There doesn't seem to be any way out of this.

What I really want is for all mail received by fetchmail to be delivered locally, and all other mail to be sent out over the wild internet.

Any ideas?

Perfect Thunder
Paranoid (IV) Inmate

From: Milwaukee
Insane since: Oct 2001

posted posted 05-12-2003 02:29

Well, I finally managed to solve my problems. So, everything worked out for the best.

« BackwardsOnwards »

Show Forum Drop Down Menu