Re: Need to create a mail dead-end or "super" catch-all

2009-06-09 Thread Wietse Venema
Michael Glenney:
> 
> I have a request from one of our developers and I want to see if I can
> fulfill it with Postfix.
> 
> We have a services platform that has the ability to send out mail to
> users.  We have a QA version of that platform that has an old copy of
> user data for testing.  For now the SMTP relay option of the QA server
> is set to a non-existent host so that mail will not get sent to users.
> They would like the ability to test the mail without worrying that a
> mail will get sent to one of the users.
> 
> I would like to setup a IMAP/SMTP server on the local host and enable
> the application to send to it.  I need all mail, no matter who it is
> addressed to, to be delivered to one account on the server that will be
> accessed via IMAP.  The server can never relay out.  Any message that
> comes in on port 25 gets put in this mailbox.
> 
> Is this something that can be done with Postfix?  I don't need any hand
> holding but a punt in the right direction would certainly be helpful.

/etc/postfix/main.cf:
virtual_alias_maps = static:u...@example.com

Wietse


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Truth Seeker


i feel like you can use ;

always_bcc = mailc...@yourdomain.com

in /etc/postfix/main.cf file


this will keep a copy of all mails which is received and send by your system in 
mailcopy mailbox.


-
--
---
Always try to find truth!!!


--- On Wed, 6/10/09, Wietse Venema  wrote:

> From: Wietse Venema 
> Subject: Re: Need to create a mail dead-end or "super" catch-all
> To: "Michael Glenney" 
> Cc: postfix-us...@cloud9.net
> Date: Wednesday, June 10, 2009, 2:00 AM
> Michael Glenney:
> > 
> > I have a request from one of our developers and I want
> to see if I can
> > fulfill it with Postfix.
> > 
> > We have a services platform that has the ability to
> send out mail to
> > users.  We have a QA version of that platform
> that has an old copy of
> > user data for testing.  For now the SMTP relay
> option of the QA server
> > is set to a non-existent host so that mail will not
> get sent to users.
> > They would like the ability to test the mail without
> worrying that a
> > mail will get sent to one of the users.
> > 
> > I would like to setup a IMAP/SMTP server on the local
> host and enable
> > the application to send to it.  I need all mail,
> no matter who it is
> > addressed to, to be delivered to one account on the
> server that will be
> > accessed via IMAP.  The server can never relay
> out.  Any message that
> > comes in on port 25 gets put in this mailbox.
> > 
> > Is this something that can be done with Postfix? 
> I don't need any hand
> > holding but a punt in the right direction would
> certainly be helpful.
> 
> /etc/postfix/main.cf:
>     virtual_alias_maps = static:u...@example.com
> 
>     Wietse
> 






RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney



> -Original Message-
> From: Wietse Venema [mailto:wie...@porcupine.org]
> Sent: Tuesday, June 09, 2009 4:00 PM
> To: Michael Glenney
> Cc: postfix-us...@cloud9.net
> Subject: Re: Need to create a mail dead-end or "super" catch-all
> 
> Michael Glenney:
> >
> > I have a request from one of our developers and I want to see if I
> can
> > fulfill it with Postfix.
> >
> > We have a services platform that has the ability to send out mail to
> > users.  We have a QA version of that platform that has an old copy
of
> > user data for testing.  For now the SMTP relay option of the QA
> server
> > is set to a non-existent host so that mail will not get sent to
> users.
> > They would like the ability to test the mail without worrying that a
> > mail will get sent to one of the users.
> >
> > I would like to setup a IMAP/SMTP server on the local host and
enable
> > the application to send to it.  I need all mail, no matter who it is
> > addressed to, to be delivered to one account on the server that will
> be
> > accessed via IMAP.  The server can never relay out.  Any message
that
> > comes in on port 25 gets put in this mailbox.
> >
> > Is this something that can be done with Postfix?  I don't need any
> hand
> > holding but a punt in the right direction would certainly be
helpful.
> 
> /etc/postfix/main.cf:
> virtual_alias_maps = static:u...@example.com
> 
>   Wietse

Ok. I lied.  I need some hand-holding :)  I guess I'm just a little
confused about how virtual aliases and domains work.

I added what you said above:

[r...@server postfix]# postconf virtual_alias_maps
virtual_alias_maps = static:michael.glen...@mycompaniesmaildomain.com

The postfix on this server is the default setup and is generally just
used by our SA's to send mail from the command line when needed.  It's
setup with a relay host other than that the conf file seems right "out
of the box".  My thought now is that I'll just have everything go to a
DL that our devs are on and they can filter locally but I'm testing with
my e-mail address.

I tried to send an email from the command line to my gmail account:

[r...@server postfix]# mail -s asdfasdf 
asdf
.
Cc:

And it looks like the address was rewritten properly but it's not
getting delivered and I have this error in /var/log/maillog:

Jun 10 11:33:37 server postfix/error[1587]: 8FEF724264:
to=, orig_to=,
relay=none, delay=0, status=bounced (User unknown in virtual alias
table)

I appreciate any help you can give me.

Thanks,

Mike G.

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
Michael Glenney:
> 
> 
> 
> > -Original Message-
> > From: Wietse Venema [mailto:wie...@porcupine.org]
> > Sent: Tuesday, June 09, 2009 4:00 PM
> > To: Michael Glenney
> > Cc: postfix-us...@cloud9.net
> > Subject: Re: Need to create a mail dead-end or "super" catch-all
> > 
> > Michael Glenney:
> > >
> > > I have a request from one of our developers and I want to see if I
> > can
> > > fulfill it with Postfix.
> > >
> > > We have a services platform that has the ability to send out mail to
> > > users.  We have a QA version of that platform that has an old copy
> of
> > > user data for testing.  For now the SMTP relay option of the QA
> > server
> > > is set to a non-existent host so that mail will not get sent to
> > users.
> > > They would like the ability to test the mail without worrying that a
> > > mail will get sent to one of the users.
> > >
> > > I would like to setup a IMAP/SMTP server on the local host and
> enable
> > > the application to send to it.  I need all mail, no matter who it is
> > > addressed to, to be delivered to one account on the server that will
> > be
> > > accessed via IMAP.  The server can never relay out.  Any message
> that
> > > comes in on port 25 gets put in this mailbox.
> > >
> > > Is this something that can be done with Postfix?  I don't need any
> > hand
> > > holding but a punt in the right direction would certainly be
> helpful.
> > 
> > /etc/postfix/main.cf:
> > virtual_alias_maps = static:u...@example.com
> > 
> > Wietse
> 
> Ok. I lied.  I need some hand-holding :)  I guess I'm just a little
> confused about how virtual aliases and domains work.

I told you to use a virtual alias MAP. I did not tell you to use
a virtual alias DOMAIN.

My example requires that you can already receive mail at
u...@example.com. Never will Postfix create an account just
because you send mail to it.

See http://www.postfix.org/VIRTUAL_README.html if you really 
think that you must use a virtual domain.

Wietse


RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney

> 
> I told you to use a virtual alias MAP. I did not tell you to use
> a virtual alias DOMAIN.
> 
> My example requires that you can already receive mail at
> u...@example.com. Never will Postfix create an account just
> because you send mail to it.
> 
> See http://www.postfix.org/VIRTUAL_README.html if you really
> think that you must use a virtual domain.
> 
>   Wietse

I set it up as a map as you specified.  I apologize for using the word
domain in my previous message.  When I received the "User unknown in
virtual alias table" I started researching that error.  It led me to a
string of other messages you were involved with
http://www.irbs.net/internet/postfix/0511/1861.html.  That led me down
the virtual domains path.  I always try to figure it out myself first
before posting to the list.

Let me reset:  I have a linux box with Postfix on it.  The Postfix
install currently just forwards mail that is sent via the command line
off to an internal SMTP relay that handles it from there.  The Postfix
install on this server doesn't receive mail for anyone currently.

My devs have an app that is hosted on this server.  The app has old
"live" data on it that has email addresses of actual customers.
Currently, within the app, they have the SMTP server set to some null
value so that when they are testing (this box is in QA), they don't
accidentally send an email to one of our customers as the live app does.
It's a custom app and they would like the ability to allow it to send
the emails so they can QA the formatting and content of those messages
but not have the emails actually route to their intended recipient.  I
hope that makes sense.

The "virtual_alias_map" setting seems to be exactly what I want.  Every
message I send from the command line, no matter who I address it to,
get's redirected to the address I set for virtual_alias_map (from what I
am seeing in /var/log/maillog).  I just get the "User unknown" error.

The goal is to have them change the SMTP server setting in their app
from the null value to "localhost".  Postfix is currently only listening
to port 25 on 127.0.0.1.  If mail gets sent from the app to any address,
it's accepted by postfix on 127.0.0.1:25, postfix rewrites the "to"
address to the address set by virtual_alias_maps, forwards it to the
relay.

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
Michael Glenney:
> I set it up as a map as you specified.  

And you failed to create the destination email account first.

My example requires that the address "u...@example.com" as used in
the example already works.

/etc/postfix/main.cf
virtual_alias_maps = static:u...@example.com

I suggest that you hold off with my example until you can send mail
to the destination account that you want to use as the catch-all.

Wietse


RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney

> -Original Message-
> From: Wietse Venema [mailto:wie...@porcupine.org]
> Sent: Wednesday, June 10, 2009 1:20 PM
> To: Michael Glenney
> Cc: postfix-us...@cloud9.net
> Subject: Re: Need to create a mail dead-end or "super" catch-all
> 
> Michael Glenney:
> > I set it up as a map as you specified.
> 
> And you failed to create the destination email account first.
> 
> My example requires that the address "u...@example.com" as used in
> the example already works.
> 
> /etc/postfix/main.cf
>   virtual_alias_maps = static:u...@example.com
> 
> I suggest that you hold off with my example until you can send mail
> to the destination account that you want to use as the catch-all.
> 
>   Wietse

I see what you're saying now.  I have a destination account.  I'm
testing with my main domain account on our exchange system I just
changed the domain name in my examples because I'm in the habit of doing
so.

Without your change:

[r...@servername postfix]# mail -s test1
michael.glen...@mycompaniesdomain.edu
test1
.
Cc:

Jun 10 13:47:45 servername postfix/pickup[7576]: 8CF9624261: uid=0
from=
Jun 10 13:47:45 servername postfix/cleanup[7621]: 8CF9624261:
message-id=<20090610204745.8cf9624...@onlq300asv01.qaols.internaldomain.
edu>
Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261:
from=, size=352, nrcpt=1 (queue active) 
Jun 10 13:47:45 servername postfix/smtp[7623]: 8CF9624261:
to=,
relay=onlq300mlx01.qaols.intenaldomain.edu[10.25.19.17], delay=0,
status=sent (250 Ok: queued as A8E791026A)
Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261: removed


With your change:

[r...@servername postfix]# postconf virtual_alias_maps
virtual_alias_maps = static:michael.glen...@mycompaniesdomain.edu

(now I'm hoping that if I send a message to ANY email address it will go
to my email instead)

[r...@servername postfix]# mail -s test2 ob...@whitehouse.gov
test2
.
Cc:

Jun 10 13:56:48 servername postfix/pickup[8607]: C379724261: uid=0
from=
Jun 10 13:56:48 servername postfix/cleanup[9570]: C379724261:
message-id=<20090610205648.c379724...@onlq300asv01.qaols.phoenix.edu>
Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261:
from=, size=343, nrcpt=1
(queue active)
Jun 10 13:56:48 servername postfix/error[9572]: C379724261:
to=,
orig_to=, relay=none, delay=0, status=bounced
(User unknown in virtual alias table)
Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261: removed


Once thing I notice is that relay=none after the change.  Maybe that's
where the issue is.  Not being relayed and that account isn't local to
the box that Postfix is on so Postfix is bouncing it (which it should).

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
This would be a good time to confess you are using "my" virtual
alias and sending mail to another virtual alias.

Don't do that.  Your catch-all destination needs to be a non-virtual
address.

Wietse


RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney

> This would be a good time to confess you are using "my" virtual
> alias and sending mail to another virtual alias.
> 
> Don't do that.  Your catch-all destination needs to be a non-virtual
> address.
> 
>   Wietse

After this message I was starting to think you were just some guy who's
screwing with me.  Then I took a second and googled your name :)  I
guess I'm not coming across as genuine if you feel I'm deceiving you in
some way.  I'll give this one more shot and then you can tell me to go
away.

Can Postfix do this?:
1)  Postfix receives message addressed to anyn...@anydomain
2)  Postfix replaces anyn...@anydomain with my corporate e-mail address
3)  Postfix sends message to a relay

Thanks.  I appreciate you taking the time to help me out.

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread /dev/rob0
On Wed June 10 2009 17:50:34 Michael Glenney wrote:
> After this message I was starting to think you were just some guy
> who's screwing with me.  Then I took a second and googled your name
> :)  I guess I'm not coming across as genuine if you feel I'm
> deceiving you in some way.  I'll give this one more shot and then you
> can tell me to go away.

You're just not understanding the problem. "User unknown in virtual 
alias table" means that the DOMAIN (right-hand side after the "@") is 
in virtual_alias_domains, but the usern...@domain (full email address) 
is NOT found in virtual_alias_maps. This also occurs when the 
virtual_alias_maps lookup RESULT is an email address in 
virtual_alias_domains.

You CANNOT virtually alias to a virtual alias. The result of a 
virtual_alias_maps lookup must be a real mailbox or email address 
somewhere.

A common misconception is that a bare username (with no @domain) is a 
Unix system account. That's the default, but it's not always true, 
depending on the value of myorigin.

> Can Postfix do this?:
> 1)  Postfix receives message addressed to anyn...@anydomain
> 2)  Postfix replaces anyn...@anydomain with my corporate e-mail
> address
> 3)  Postfix sends message to a relay 

Your problem seems to be that you cannot deliver to your corporate 
address, and the problem there seems to be that you have listed that 
domain as a virtual alias domain.

Wietse suggested that first, you try to send mail to this address 
without using the wildcard virtual_alias_maps. When you can do that 
successfully, you can implement the wildcard. Until then, there is no 
point in muddying the issue!

See the BASIC readme for assistance with the basic settings you need. 
Don't set anything that you don't understand. Don't try the 
virtual_alias_maps setting yet, until you have confirmed that you can 
send mail through your Postfix to the address you want to use for the 
alias.

> Thanks.  I appreciate you taking the time to help me out.
>
> MG
>
> This message is private and confidential. If you have received it in
> error, please notify the sender and remove it from your system.

Sigh ... these disclaimers are offensive, even more so when posted on 
public mailing lists.
-- 
Offlist mail to this address is discarded unless
"/dev/rob0" or "not-spam" is in Subject: header


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Noel Jones

Michael Glenney wrote:

-Original Message-
From: Wietse Venema [mailto:wie...@porcupine.org]
Sent: Wednesday, June 10, 2009 1:20 PM
To: Michael Glenney
Cc: postfix-us...@cloud9.net
Subject: Re: Need to create a mail dead-end or "super" catch-all

Michael Glenney:

I set it up as a map as you specified.

And you failed to create the destination email account first.

My example requires that the address "u...@example.com" as used in
the example already works.

/etc/postfix/main.cf
virtual_alias_maps = static:u...@example.com

I suggest that you hold off with my example until you can send mail
to the destination account that you want to use as the catch-all.

Wietse


I see what you're saying now.  I have a destination account.  I'm
testing with my main domain account on our exchange system I just
changed the domain name in my examples because I'm in the habit of doing
so.

Without your change:

[r...@servername postfix]# mail -s test1
michael.glen...@mycompaniesdomain.edu
test1
.
Cc:

Jun 10 13:47:45 servername postfix/pickup[7576]: 8CF9624261: uid=0
from=
Jun 10 13:47:45 servername postfix/cleanup[7621]: 8CF9624261:
message-id=<20090610204745.8cf9624...@onlq300asv01.qaols.internaldomain.
edu>
Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261:
from=, size=352, nrcpt=1 (queue active) 
Jun 10 13:47:45 servername postfix/smtp[7623]: 8CF9624261:

to=,
relay=onlq300mlx01.qaols.intenaldomain.edu[10.25.19.17], delay=0,
status=sent (250 Ok: queued as A8E791026A)
Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261: removed


With your change:

[r...@servername postfix]# postconf virtual_alias_maps
virtual_alias_maps = static:michael.glen...@mycompaniesdomain.edu

(now I'm hoping that if I send a message to ANY email address it will go
to my email instead)

[r...@servername postfix]# mail -s test2 ob...@whitehouse.gov
test2
.
Cc:

Jun 10 13:56:48 servername postfix/pickup[8607]: C379724261: uid=0
from=
Jun 10 13:56:48 servername postfix/cleanup[9570]: C379724261:
message-id=<20090610205648.c379724...@onlq300asv01.qaols.phoenix.edu>
Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261:
from=, size=343, nrcpt=1
(queue active)
Jun 10 13:56:48 servername postfix/error[9572]: C379724261:
to=,
orig_to=, relay=none, delay=0, status=bounced
(User unknown in virtual alias table)
Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261: removed


Once thing I notice is that relay=none after the change.  Maybe that's
where the issue is.  Not being relayed and that account isn't local to
the box that Postfix is on so Postfix is bouncing it (which it should).

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.



You also need to set
virtual_alias_domains =
ie. set to an empty value.

  -- Noel Jones


RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney



> -Original Message-
> From: Noel Jones [mailto:njo...@megan.vbhcs.org]
> Sent: Wednesday, June 10, 2009 4:09 PM
> To: Michael Glenney; postfix users list
> Subject: Re: Need to create a mail dead-end or "super" catch-all
> 
> Michael Glenney wrote:
> >> -Original Message-
> >> From: Wietse Venema [mailto:wie...@porcupine.org]
> >> Sent: Wednesday, June 10, 2009 1:20 PM
> >> To: Michael Glenney
> >> Cc: postfix-us...@cloud9.net
> >> Subject: Re: Need to create a mail dead-end or "super" catch-all
> >>
> >> Michael Glenney:
> >>> I set it up as a map as you specified.
> >> And you failed to create the destination email account first.
> >>
> >> My example requires that the address "u...@example.com" as used in
> >> the example already works.
> >>
> >> /etc/postfix/main.cf
> >>virtual_alias_maps = static:u...@example.com
> >>
> >> I suggest that you hold off with my example until you can send mail
> >> to the destination account that you want to use as the catch-all.
> >>
> >>Wietse
> >
> > I see what you're saying now.  I have a destination account.  I'm
> > testing with my main domain account on our exchange system I just
> > changed the domain name in my examples because I'm in the habit of
> doing
> > so.
> >
> > Without your change:
> >
> > [r...@servername postfix]# mail -s test1
> > michael.glen...@mycompaniesdomain.edu
> > test1
> > .
> > Cc:
> >
> > Jun 10 13:47:45 servername postfix/pickup[7576]: 8CF9624261: uid=0
> > from=
> > Jun 10 13:47:45 servername postfix/cleanup[7621]: 8CF9624261:
> > message-
> id=<20090610204745.8cf9624...@onlq300asv01.qaols.internaldomain.
> > edu>
> > Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261:
> > from=, size=352, nrcpt=1 (queue active)
> > Jun 10 13:47:45 servername postfix/smtp[7623]: 8CF9624261:
> > to=,
> > relay=onlq300mlx01.qaols.intenaldomain.edu[10.25.19.17], delay=0,
> > status=sent (250 Ok: queued as A8E791026A)
> > Jun 10 13:47:45 servername postfix/qmgr[7577]: 8CF9624261: removed
> >
> >
> > With your change:
> >
> > [r...@servername postfix]# postconf virtual_alias_maps
> > virtual_alias_maps = static:michael.glen...@mycompaniesdomain.edu
> >
> > (now I'm hoping that if I send a message to ANY email address it
will
> go
> > to my email instead)
> >
> > [r...@servername postfix]# mail -s test2 ob...@whitehouse.gov
> > test2
> > .
> > Cc:
> >
> > Jun 10 13:56:48 servername postfix/pickup[8607]: C379724261: uid=0
> > from=
> > Jun 10 13:56:48 servername postfix/cleanup[9570]: C379724261:
> >
message-id=<20090610205648.c379724...@onlq300asv01.qaols.phoenix.edu>
> > Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261:
> > from=, size=343, nrcpt=1
> > (queue active)
> > Jun 10 13:56:48 servername postfix/error[9572]: C379724261:
> > to=,
> > orig_to=, relay=none, delay=0, status=bounced
> > (User unknown in virtual alias table)
> > Jun 10 13:56:48 servername postfix/qmgr[8608]: C379724261: removed
> >
> >
> > Once thing I notice is that relay=none after the change.  Maybe
> that's
> > where the issue is.  Not being relayed and that account isn't local
> to
> > the box that Postfix is on so Postfix is bouncing it (which it
> should).
> >
> > MG
> >
> > This message is private and confidential. If you have received it in
> error, please notify the sender and remove it from your system.
> 
> 
> You also need to set
> virtual_alias_domains =
> ie. set to an empty value.
> 
>-- Noel Jones

That's exactly what I needed.  Thanks.  Works now.

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
Michael Glenney:
> Can Postfix do this?:

Yes, but it does not help when you add a virtual alias DOMAIN,
when I ask you to add only a virtual alias MAP.

Wietse


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Noel Jones

/dev/rob0 wrote:

On Wed June 10 2009 17:50:34 Michael Glenney wrote:

After this message I was starting to think you were just some guy
who's screwing with me.  Then I took a second and googled your name
:)  I guess I'm not coming across as genuine if you feel I'm
deceiving you in some way.  I'll give this one more shot and then you
can tell me to go away.


You're just not understanding the problem. "User unknown in virtual 
alias table" means that the DOMAIN (right-hand side after the "@") is 
in virtual_alias_domains, but the usern...@domain (full email address) 
is NOT found in virtual_alias_maps. This also occurs when the 
virtual_alias_maps lookup RESULT is an email address in 
virtual_alias_domains.


You CANNOT virtually alias to a virtual alias. The result of a 
virtual_alias_maps lookup must be a real mailbox or email address 
somewhere.


Don't bash OP too hard.  He got bit by the interaction of the 
default value of virtual_alias_domains = $virtual_alias_maps 
and a static map in virtual_alias_maps.  That made every 
domain match the virtual_alias_domains lookup.


Just a funny interaction with a seldom-used configuration.


  -- Noel Jones


RE: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Michael Glenney

> 
> Yes, but it does not help when you add a virtual alias DOMAIN,
> when I ask you to add only a virtual alias MAP.
> 
>   Wietse

Wietse, sorry my last reply went straight to you.  Forgot to change the
addresses.  Wanted to post here in case anyone else has this issue
though it's a strange setup.

Noel hit it on the head.  There's a default setting for
virtual_alias_domains.  Due to my inexperience with Postfix I didn't
realize that I needed to check the main.cf.default as well.  We have a
policy here that when we change a conf we first copy it to
.default.  Because of that I ignored that file completely.  I
should have run a `postconf virtual_alias_domains`.  That would have
showed me that the value was set somewhere else and I would have tracked
it down.

Thanks all.  I appreciate the help.

MG

This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
Noel Jones:
> Don't bash OP too hard.  He got bit by the interaction of the 
> default value of virtual_alias_domains = $virtual_alias_maps 
> and a static map in virtual_alias_maps.  That made every 
> domain match the virtual_alias_domains lookup.
> 
> Just a funny interaction with a seldom-used configuration.

Indeed. With "virtual_alias_maps = static:u...@example.com", and
the default "virtual_alias_domains = $virtual_alias_maps", the
virtual_alias_domains lookup will always succeed.

Wietse


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread /dev/rob0
On Wed June 10 2009 18:28:44 Noel Jones wrote:
> Don't bash OP too hard.  He got bit by the interaction of the
> default value of virtual_alias_domains = $virtual_alias_maps
> and a static map in virtual_alias_maps.  That made every
> domain match the virtual_alias_domains lookup.
>
> Just a funny interaction with a seldom-used configuration.

Oh yikes, you're right (as usual), I didn't think about that. Good 
catch! I didn't mean for it to come across as bashing the OP, my 
apologies if it did.

(Disclaimer: um ... I *did* mean to bash him about the disclaimer ;) )
-- 
Offlist mail to this address is discarded unless
"/dev/rob0" or "not-spam" is in Subject: header


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Wietse Venema
Wietse Venema:
> Noel Jones:
> > Don't bash OP too hard.  He got bit by the interaction of the 
> > default value of virtual_alias_domains = $virtual_alias_maps 
> > and a static map in virtual_alias_maps.  That made every 
> > domain match the virtual_alias_domains lookup.
> > 
> > Just a funny interaction with a seldom-used configuration.
> 
> Indeed. With "virtual_alias_maps = static:u...@example.com", and
> the default "virtual_alias_domains = $virtual_alias_maps", the
> virtual_alias_domains lookup will always succeed.

This probably needs to be documented under "basic configuration"
or "standard configuration". What appears to be an obvious
solutil (one-line alias) breaks in a way that is not obvious.

Wietse


Re: Need to create a mail dead-end or "super" catch-all

2009-06-10 Thread Noel Jones

Wietse Venema wrote:

Wietse Venema:

Noel Jones:
Don't bash OP too hard.  He got bit by the interaction of the 
default value of virtual_alias_domains = $virtual_alias_maps 
and a static map in virtual_alias_maps.  That made every 
domain match the virtual_alias_domains lookup.


Just a funny interaction with a seldom-used configuration.

Indeed. With "virtual_alias_maps = static:u...@example.com", and
the default "virtual_alias_domains = $virtual_alias_maps", the
virtual_alias_domains lookup will always succeed.


This probably needs to be documented under "basic configuration"
or "standard configuration". What appears to be an obvious
solutil (one-line alias) breaks in a way that is not obvious.

Wietse


I think a note/warning in
http://www.postfix.org/postconf.5.html#virtual_alias_maps
would be sufficient.

Or else a new section in "standard configuration" on setting 
up an "email blackhole" since there have been a few questions 
about this simple but non-obvious configuration.  Really 
wouldn't need much more than

mydestination = example.com
virtual_alias_domains =
virtual_alias_maps = static:u...@example.com

I also had the idea we could discard any virtual_alias_domains 
lookup that returns something that looks like an email 
address.  But nah, breaks backwards compatibility, too hard to 
document cleanly, and "what's an email address look like?".


  -- Noel Jones


Re: Need to create a mail dead-end or "super" catch-all

2009-07-07 Thread R . P . Aditya
Wietse Venema  porcupine.org> writes:
> Wietse Venema:
> > Noel Jones:
> > > Don't bash OP too hard.  He got bit by the interaction of the 
> > > default value of virtual_alias_domains = $virtual_alias_maps 
> > > and a static map in virtual_alias_maps.  That made every 
> > > domain match the virtual_alias_domains lookup.
> > > 
> > > Just a funny interaction with a seldom-used configuration.
> > 
> > Indeed. With "virtual_alias_maps = static:user  example.com", and
> > the default "virtual_alias_domains = $virtual_alias_maps", the
> > virtual_alias_domains lookup will always succeed.
> 
> This probably needs to be documented under "basic configuration"
> or "standard configuration". What appears to be an obvious
> solutil (one-line alias) breaks in a way that is not obvious.
 
I'm trying to do this on a second smtpd process running on a non-standard port:

master.cf
2025  inet  n   -   n   -   -   smtpd -o
virtual_alias_maps=static:realmailaddr...@example.com -o virtual_alias_domains=,

but that doesn't seem sufficient -- what am I missing?

Thanks,
Adi




Re: Need to create a mail dead-end or "super" catch-all

2009-07-07 Thread Victor Duchovni
On Tue, Jul 07, 2009 at 03:24:37PM +, R.P. Aditya wrote:

> I'm trying to do this on a second smtpd process running on a non-standard 
> port:
> 
> master.cf
> 2025  inet  n   -   n   -   -   smtpd -o
> virtual_alias_maps=static:realmailaddr...@example.com -o 
> virtual_alias_domains=,
> 
> but that doesn't seem sufficient -- what am I missing?

The virtual_alias_domains feature is implemented in trivial-rewrite(8)
not smtpd(8).

The virtual_alias_maps feature is implemented jointly by smtpd(8)
(validation) and cleanup(8) (rewriting).

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.


Re: Need to create a mail dead-end or "super" catch-all

2009-07-07 Thread R.P. Aditya
On Tue, Jul 07, 2009 at 11:44:17AM -0400, Victor Duchovni wrote:
> On Tue, Jul 07, 2009 at 03:24:37PM +, R.P. Aditya wrote:
> 
> > I'm trying to do this on a second smtpd process running on a non-standard 
> > port:
> > 
> > master.cf
> > 2025  inet  n   -   n   -   -   smtpd -o
> > virtual_alias_maps=static:realmailaddr...@example.com -o 
> > virtual_alias_domains=,
> > 
> > but that doesn't seem sufficient -- what am I missing?
> 
> The virtual_alias_domains feature is implemented in trivial-rewrite(8)
> not smtpd(8).
> 
> The virtual_alias_maps feature is implemented jointly by smtpd(8)
> (validation) and cleanup(8) (rewriting).

ah, okay, so I can't think of another way to send all mail recieved on
a different smtp port to a catch-all address without running another
instance of postfix...right?

Thanks,
Adi


Re: Need to create a mail dead-end or "super" catch-all

2009-07-07 Thread Victor Duchovni
On Tue, Jul 07, 2009 at 12:09:55PM -0400, R.P. Aditya wrote:

> > The virtual_alias_domains feature is implemented in trivial-rewrite(8)
> > not smtpd(8).
> > 
> > The virtual_alias_maps feature is implemented jointly by smtpd(8)
> > (validation) and cleanup(8) (rewriting).
> 
> ah, okay, so I can't think of another way to send all mail recieved on
> a different smtp port to a catch-all address without running another
> instance of postfix...right?

I find a separate instance to be the simplest solution. The other option
is to use a dedicated "cleanup" instance and "-o cleanup_service_name"
in the second smtpd(8) master.cf entry.

-- 
Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:


If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.