Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix help. Need advise for email p-++++++
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
flagg0204
n00b
n00b


Joined: 17 Jan 2004
Posts: 10

PostPosted: Wed Oct 06, 2004 12:43 pm    Post subject: Postfix help. Need advise for email p-++++++ Reply with quote

Okay I am trying to setup postfix to accept any emails with the "p-xxxxxx" and route them to one user. These email address will look similair to this
p-123456
p-987654
p-456789
etc
etc

I really could you some advise. Postfix is operating correctly and I can receive email for users that DO exist on my system. But when I try to setup a "default" user for all emails from p-xxxxxx the email gets bounced with an errot in the maillog indicating "p-343434 user does not exist" status=bounced.
Back to top
View user's profile Send private message
trendzetter
n00b
n00b


Joined: 24 Aug 2003
Posts: 61
Location: Ghent, Belgium

PostPosted: Wed Oct 06, 2004 1:49 pm    Post subject: Reply with quote

Using sasl and sql I can use wildcards. I'm not sure if there are other options.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Oct 06, 2004 6:15 pm    Post subject: Reply with quote

You want to use the recipient_delimiter function in Postfix. In your case you'd want to add this line to your /etc/postfix/main.cf
Code:

recipient_delimiter = -


You'd need an alias for p to point to the user and you're pretty much set.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
flagg0204
n00b
n00b


Joined: 17 Jan 2004
Posts: 10

PostPosted: Wed Oct 06, 2004 11:13 pm    Post subject: Reply with quote

So by using the recipient delimeter what does that do? How does postfix know to send all mail beginning with p-xxxxxx to the same user?
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Oct 06, 2004 11:23 pm    Post subject: Reply with quote

Google broken today?

http://www.postfix.org/canonical.5.html

ADDRESS EXTENSION
When a mail address localpart contains the optional recipient delimiter (e.g., user+foo@domain), the lookup order becomes: user+foo@domain, user@domain, user+foo, user, and @domain.

Set the delimiter to - and then the lookup order becomes p-12233@domian, p@domin, p-12345, p with the first match being the addess that gets delievered to. You may want to use + instead of - as that's less likely to exist in a username.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
flagg0204
n00b
n00b


Joined: 17 Jan 2004
Posts: 10

PostPosted: Thu Oct 07, 2004 8:43 am    Post subject: Reply with quote

No google is not broken. In fact I did google several times for this information before I posted here. The problem is the terminology used in the descriptions. Not all of us are as gifted at understanding the tech speak that man pages usually are written in, so i apologize if my questions comes off more "noobish" than normal. What I have done so far
changed recipient_delimiter to "-"
reloaded postfix in order for change to take effect
create an alias in /etc/aliases for
p: username
ran newaliases to rebuild aliasdb.

However email sent to p-xxxxx is still being bounced do to postfix not recognizeing the username. I am beginning to think that may alias may be at fault, so I googled for that, but I can't seem to find any similiar situation out there that may apply to my situation. Then again I may not be searching for the right things. :(
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Thu Oct 07, 2004 3:18 pm    Post subject: Reply with quote

Hmmm testing on two servers and it works in both places whether I use - or +. Even on my funky virtual domain box that I need to fix soon.

Do a postconf -n and post the results.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
flagg0204
n00b
n00b


Joined: 17 Jan 2004
Posts: 10

PostPosted: Fri Oct 08, 2004 5:22 am    Post subject: Reply with quote

I spoke to soon. The mail is now people accepting and forwarded correctly. Thank you for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum