LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Postfix User forwarding confusion (https://www.linuxquestions.org/questions/linux-networking-3/postfix-user-forwarding-confusion-384536/)

rbonafied 11-18-2005 11:12 PM

Postfix User forwarding confusion
 
I must be using the wrong terms in my search. I'm having difficulty understanding the postfix documentation and can't find something to lift the fog. Here goes ...


I have an email forward subscription that I pay for where:
user1@mydomain is forwarded to otheruser1@somecomcast.net[/email]
user2@mydomain is forwarded to otheruser2@somecomcast.net[/email]
catchall@mydomain is forwarded to catchall@somecomcast.net[/email]

My MX record is currently pointing to:
10:mailservice.ipayforthis.com

I want to setup a server to do this myself so I don't have to pay them anymore and solve some other problems. The server is in my house behind a router. It runs Mandriva Linux with postfix.

Here's where I need help:

Assuming I setup another MX record to call my server instead of the ipayforthis.com server. How do I duplicate the forwarding behavior? And by how, I really could use actual steps since I can't seem to make heads or tails of the documentation myself. Oh, and I don't want to create "local" users on the server.

1) What parameters do I activate in the postfix files and what should their values be?
2) Where are the user forward mappings stored?
3) Is this even possible?

Thank you!
r

Berhanie 11-19-2005 08:16 AM

In your main.cf:
Code:

mydestination =
virtual_alias_domain = mydomain.com
virtual_alias_maps = hash:/etc/postfix/virtual

Create a file /etc/postfix/virtual with these lines:
Code:

user1@mydomain.com        otheruser1@somecomcast.net
user2@mydomain.com        otheruser2@somecomcast.net
@mydomain.com            spamlover@somecomcast.net

Finally, convert the virtual table to a .db file and reload the new config:
Code:

# postmap /etc/postfix/virtual
# postfix reload

The catchall is a bad idea because of the high volume of spam you're likely to get. It's best to accept mail only to valid recipients.

rbonafied 11-19-2005 01:27 PM

That worked perfectly. Thank you very much.


Now on to spam detection. :)

rbonafied 11-19-2005 02:11 PM

One of the addresses I am forwarding to is on AOL. I am getting a delivery error. Can anyone offer some insight into why this is happening?

In the virtual file I have:
example_example@mydomain.com example_example@aol.com


Error text below:

Reporting-MTA: dns; comcast.net
Arrival-Date: 19 Nov 2005 19:48:51 +0000

Final-Recipient: rfc822; <example_example@aol.com>
Action: failed
Status: 5.1.0 MAIL FROM: <me@mydomain.com> 554 REPLY: 554-:__(HVU:B1)_http://postmaster.info.aol.com/errors/554hvub1.html
Diagnostic-Code: smtp; Permanent Failure: Other address status
Last-Attempt-Date: Sat, 19 Nov 2005 19:48:52 -0000

Berhanie 11-19-2005 04:55 PM

Following the link provided in the error message...
Quote:

Error 554 HVU:B1

554 HVU:B1
http://postmaster.info.aol.com/errors/554hvub1.html
EXPLANATION:

There is at least one URL in your email that is generating substantial complaints from AOL members.

SOLUTION:

If you own all the domains linked to in your e-mail, please contact us to discuss more effective management of your complaint levels. You can start by setting up a free complaint loop through this form. This will allow you to receive AOL member complaints against your domain.

If you do not own the domain, please have the owner of that domain contact us.

rbonafied 11-19-2005 06:26 PM

If I'm relaying my mail through smtp.comcast.net using the following line in main.cf, wouldn't this act like smtp.comcast is what sent the mail on to AOL and thereby be an acceptable domain?

relayhost = smtp.comcast.net


Or does AOL think the email originated from an unofficial ip/domain and thereby blocked it?


Either way, is there a right way to do the "relaying" so AOL and other sites won't complain?

Thanks again,
r

Berhanie 11-19-2005 07:38 PM

Seems they're complaining about content (an offensive URL in the message body), not about where the mail originated. But, then you might try sending something inoffensive to test this theory.

rbonafied 11-20-2005 08:37 AM

Hmmm...I can't imagine why it would be considered "offensive". The email originated by me (via thunderbird) from smtp.comcast.net, then hit the internet to my domain (mydomain.com) which sent it back to my server which would have forwarded it to aol. So I think it only passed through 3 unique servers (that I can figure). The message itself was this:

"I just sent you this email to testuser@mydomain.com . Please let me know
if you got it at your aol address."

r

rbonafied 11-20-2005 09:50 AM

I just got off the phone with AOL. It seems they have something that actually scans the body of a message for link "correctness". For some reason AOL didn't like the particular email address included in the body. When I removed the link, the email went through.

I'm not sure if it's worth it for me to try digging into why AOL would consider that email address malformed, or otherwise incorrect. The only thing that pops to mind is my MX record was pointing to a CNAME instead of an A name. I've since corrected that.

Anyway, thank you, Berhanie, for all your help.

r

Berhanie 11-20-2005 10:30 AM

You're welcome.


All times are GMT -5. The time now is 09:25 AM.