$mydestination for Virtual Domains

2014-10-28 Thread Tom Browder
I am planning to use a single, remotely hosted server with on IP as a
mail server (as well as a web server) for sevral virtual domains.  The
server currently has a name but it is of no significance (and is not
identified as belonging) to any of the public domains.

As I understand things, I must have one mydestination domain, and it
must not be listed in the virtual_alias_domains map.

When setting up Postfix to serve multiple virtual domains and virtual
mail boxes for, say, e1.com, e2.org, and e3.net, is there any reason
to select any particular one for mydestination?

Thanks,

Best regards,

-Tom


Forwarding client information with XCLIENT instead of XFORWARD

2014-10-28 Thread Markus Benning
Hello,

i'm using a before queue content filter setup with smtpd_proxy_filter and
smtp_send_xforward_command=yes. So far no problem.
But now i want to implement a whitelisting for some checks based on
the client IP address in the content filter.
The content filter supports both XFORWARD and XCLIENT.
Like postfix the content filter uses XFORWARD only for logging.
If i send the client information within a XCLIENT command
i'm able to defined restrictions/whitelistings based on the
(virtual) client address in the content filter.
But postfix is only able to send XFORWARD.

Is there a reason why theres no option like smtp_send_xclient_command yet?

   Markus



Re: $mydestination for Virtual Domains

2014-10-28 Thread Noel Jones
On 10/28/2014 8:10 AM, Tom Browder wrote:
> I am planning to use a single, remotely hosted server with on IP as a
> mail server (as well as a web server) for sevral virtual domains.  The
> server currently has a name but it is of no significance (and is not
> identified as belonging) to any of the public domains.
> 
> As I understand things, I must have one mydestination domain, and it
> must not be listed in the virtual_alias_domains map.
> 
> When setting up Postfix to serve multiple virtual domains and virtual
> mail boxes for, say, e1.com, e2.org, and e3.net, is there any reason
> to select any particular one for mydestination?

Do not put a virtual domain in mydestination.

mydestination can be set explicitly empty, or can be set to
"localhost" or eg. "localhost.example.com"



  -- Noel Jones


Re: $mydestination for Virtual Domains

2014-10-28 Thread Tom Browder
On Tue, Oct 28, 2014 at 8:38 AM, Noel Jones  wrote:
...
> Do not put a virtual domain in mydestination.
>
> mydestination can be set explicitly empty, or can be set to
> "localhost" or eg. "localhost.example.com"

Thanks, Noel, that is very helpful and I don't remember ever seeing
that stated so clearly before.

Best regards,

-Tom


Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
Hi all, I'm new to the list and to Postfix in general.
I'm in the process of upgrading and old server I have that's running Qmail. I 
figured now would be a good time to learn something new as I sure don't 
remember what I patched Qmail with 10 years ago.

Here's the breakdown, this is a fax gateway server with only one local user. 
I'm looking to replicate what I have Qmail doing. Right now it will accept all 
email for the address format 
fax-#@aafax.mydomain.com.
 From there I pass the email to a script and it does the rest. Right now I'm 
stuck at how to get Postfix to accept the email in that format. I'd rather not 
change this format as I have my users trained very well.

If you need more info let me know

Thanks

Jason


This message has been scanned for malware by Websense. www.websense.com


Re: Forwarding client information with XCLIENT instead of XFORWARD

2014-10-28 Thread Wietse Venema
Markus Benning:
> Hello,
> 
> i'm using a before queue content filter setup with smtpd_proxy_filter and
> smtp_send_xforward_command=yes. So far no problem.
> But now i want to implement a whitelisting for some checks based on
> the client IP address in the content filter.
> The content filter supports both XFORWARD and XCLIENT.
> Like postfix the content filter uses XFORWARD only for logging.
> If i send the client information within a XCLIENT command
> i'm able to defined restrictions/whitelistings based on the
> (virtual) client address in the content filter.
> But postfix is only able to send XFORWARD.
> 
> Is there a reason why theres no option like smtp_send_xclient_command yet?

Yes. The reason is that all client/helo/sender/recipient access
decisions must be made BEFORE the filter, not after. Among other
things, that would break the speed adjust feature which can provide
a significant performance improvement.

Wietse


Re: Migrating to postfix

2014-10-28 Thread Noel Jones
On 10/28/2014 8:51 AM, Jason Staudenmayer wrote:
> Hi all, I’m new to the list and to Postfix in general.
> 
> I’m in the process of upgrading and old server I have that’s running
> Qmail. I figured now would be a good time to learn something new as
> I sure don’t remember what I patched Qmail with 10 years ago.
> 
>  
> 
> Here’s the breakdown, this is a fax gateway server with only one
> local user. I’m looking to replicate what I have Qmail doing. Right
> now it will accept all email for the address format
> fax-#@aafax.mydomain.com
> . From there I pass the
> email to a script and it does the rest. Right now I’m stuck at how
> to get Postfix to accept the email in that format. I’d rather not
> change this format as I have my users trained very well.
> 
>  
> 
> If you need more info let me know
> 
>  

create a user named "fax" and set
recipient_delimiter = -

http://www.postfix.org/postconf.5.html#recipient_delimiter
http://www.postfix.org/BASIC_CONFIGURATION_README.html
http://www.postfix.org/ADDRESS_REWRITING_README.html
http://www.postfix.org/documentation.html


  -- Noel Jones



Re: Migrating to postfix

2014-10-28 Thread Viktor Dukhovni
On Tue, Oct 28, 2014 at 01:51:12PM +, Jason Staudenmayer wrote:

> Here's the breakdown, this is a fax gateway server with only one
> local user. I'm looking to replicate what I have Qmail doing. Right
> now it will accept all email for the address format
> .

main.cf:
# Ideally your Postfix has PCRE support, otherwise use regexp
#
retable = pcre:${config_directory}/
indexed = ${default_database_type}:${config_directory}/

# Append any other relay domains you need.
#
relay_domains =
aafax.example.com

# Append any other relay recipient tables
#
relay_recipient_maps =
${retable}fax.re

# The above doubles as a transport table, append
# other transport tables.
#
transport_maps = 
${retable}fax.re

# One fax recipient at a time, fax transport cannot
# atomically enqueue a fax to multiple numbers.
#
fax_destination_recipient_limit = 1

fax.re
/^fax-[0-9]{13}@aafax\.example\.com$/   fax

master.cf:
faxunix  -   n   n   -   -   pipe
flags=DRhu
user=faxuser
argv=/usr/local/bin/faxscript ${sender} ${mailbox}

The script will get the envelope sender address and the localpart of
the fax email address as arguments.

-- 
Viktor.


Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> Hi all, I'm new to the list and to Postfix in general.  I'm in the
> process of upgrading and old server I have that's running Qmail.
> I figured now would be a good time to learn something new as I
> sure don't remember what I patched Qmail with 10 years ago.
>
> Here's the breakdown, this is a fax gateway server with only one
> local user. I'm looking to replicate what I have Qmail doing. Right
> now it will accept all email for the address format
> fax-#@aafax.mydomain.com.
> From there I pass the email to a script and it does the rest. Right
> now I'm stuck at how to get Postfix to accept the email in that
> format. I'd rather not change this format as I have my users trained
> very well.

This should get you started:

/etc/postfix/main.cf:
relay_domains = aafax.mydomain.com
relay_recipient_maps = hash:/etc/postfix/relay_recipients
transport_maps = hash:/etc/postfix/transport

/etc/postfix/relay_recipients:
@aafax.mydomain.com does-not-matter

/etc/postfix/transport:
aafax.mydomain.com fax:

/etc/postfix/master.cf:
fax unix  -   n   n   -   -   pipe
flags=see-manpage user=nobody argv=/path/to/command $sender $recipient

Apply "postmap transport", "postmap relay_recipients", and "postfix
reload" as appopriate.

References:
http://www.postfix.org/postconf.5.html#relay_domains
http://www.postfix.org/postconf.5.html#relay_recipient_maps
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/master.5.html
http://www.postfix.org/pipe.8.html (see "directory" and "flags").

Happy postfixing.

Wietse


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
WOW you guys are fast!
Thanks for the info I'll give this a shot today.

(sorry for top posting - stupid Outlook)

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Wietse Venema
Sent: Tuesday, October 28, 2014 10:23 AM
To: Postfix users
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> Hi all, I'm new to the list and to Postfix in general.  I'm in the 
> process of upgrading and old server I have that's running Qmail.
> I figured now would be a good time to learn something new as I sure 
> don't remember what I patched Qmail with 10 years ago.
>
> Here's the breakdown, this is a fax gateway server with only one local 
> user. I'm looking to replicate what I have Qmail doing. Right now it 
> will accept all email for the address format 
> fax-#@aafax.mydomain.com.
> From there I pass the email to a script and it does the rest. Right 
> now I'm stuck at how to get Postfix to accept the email in that 
> format. I'd rather not change this format as I have my users trained 
> very well.

This should get you started:

/etc/postfix/main.cf:
relay_domains = aafax.mydomain.com
relay_recipient_maps = hash:/etc/postfix/relay_recipients
transport_maps = hash:/etc/postfix/transport

/etc/postfix/relay_recipients:
@aafax.mydomain.com does-not-matter

/etc/postfix/transport:
aafax.mydomain.com fax:

/etc/postfix/master.cf:
fax unix  -   n   n   -   -   pipe
flags=see-manpage user=nobody argv=/path/to/command $sender $recipient

Apply "postmap transport", "postmap relay_recipients", and "postfix reload" as 
appopriate.

References:
http://www.postfix.org/postconf.5.html#relay_domains
http://www.postfix.org/postconf.5.html#relay_recipient_maps
http://www.postfix.org/postconf.5.html#transport_maps
http://www.postfix.org/master.5.html
http://www.postfix.org/pipe.8.html (see "directory" and "flags").

Happy postfixing.

Wietse


This message has been scanned for malware by Websense. www.websense.com


Re: Migrating to postfix

2014-10-28 Thread Viktor Dukhovni
On Tue, Oct 28, 2014 at 02:49:18PM +, Jason Staudenmayer wrote:

> WOW you guys are fast!
> Thanks for the info I'll give this a shot today.

Don't forget the 'fax_destination_recipient_limit = 1' setting.
Just in case some user sends the same fax to multiple phone numbers.

-- 
Viktor.


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
I did add that.

Looks like it's starting to come together. When the master.cf script is called 
where does that get run (argv=/path/to/command $sender $recipient)? I'm going 
to assume that the user= points to the user that is going to execute the script 
correct? Does this then execute in the users home directory or in the spool?

Jason

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Viktor Dukhovni
Sent: Tuesday, October 28, 2014 10:54 AM
To: Postfix users
Subject: Re: Migrating to postfix

On Tue, Oct 28, 2014 at 02:49:18PM +, Jason Staudenmayer wrote:

> WOW you guys are fast!
> Thanks for the info I'll give this a shot today.

Don't forget the 'fax_destination_recipient_limit = 1' setting.
Just in case some user sends the same fax to multiple phone numbers.

-- 
Viktor.


This message has been scanned for malware by Websense. www.websense.com


Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> I did add that.
> 
> Looks like it's starting to come together. When the master.cf
> script is called where does that get run (argv=/path/to/command
> $sender $recipient)? I'm going to assume that the user= points to
> the user that is going to execute the script correct? Does this
> then execute in the users home directory or in the spool?

http://www.postfix.org/pipe.8.html (teach a man to fish)

See also the other URLs in my response.

Wietse
> 
> -Original Message-
> From: owner-postfix-us...@postfix.org 
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Viktor Dukhovni
> Sent: Tuesday, October 28, 2014 10:54 AM
> To: Postfix users
> Subject: Re: Migrating to postfix
> 
> On Tue, Oct 28, 2014 at 02:49:18PM +, Jason Staudenmayer wrote:
> 
> > WOW you guys are fast!
> > Thanks for the info I'll give this a shot today.
> 
> Don't forget the 'fax_destination_recipient_limit = 1' setting.
> Just in case some user sends the same fax to multiple phone numbers.
> 
> -- 
>   Viktor.
> 
> 
> This message has been scanned for malware by Websense. www.websense.com
> 


Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> Sorry I missed those links (they helped). 
> Looks like it's trying to send all the email off to my main mail
> server. I've tried changing the transports, virtual and relay
> settings in master but it's still sending anything formatted as
> fax-###@aafax.mydomain.com off the server. If it helps I can
> post my configs or email them off list.

If mail isn't delivered to the pipe command, then you made a mistake
with transport_maps part, but no-one knows what mistake you made,
because you don't provide concrete informaton.  Vague eyewitness
reports are useless.

Wietse

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html

Thank you for using Postfix.


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
You're right: (sorry for the text wall)

[root@aafax postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = 10.252.10.12
inet_protocols = ipv4
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost, aafax.adventureaquarium.com
myhostname = aafax.adventureaquarium.com
mynetworks = 10.252.0.0/16, 127.0.0.0/8
mynetworks_style = subnet
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains =
relay_recipient_maps = hash:/etc/postfix/relay_recipients
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

transport:
@aafax.adventureaquarium.com fax:

relay_recipients:
@aafax.adventureaquarium.com does-not-matter


Log from trying to send a test to fax-3653...@aafax.adventureaquarium.com:

Oct 28 14:26:01 localhost postfix/smtpd[24236]: connect from 
it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:26:26 localhost postfix/smtpd[24236]: ED17C231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:26:38 localhost postfix/cleanup[24238]: ED17C231BD: message-id=<>
Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: 
from=, size=299, nrcpt=1 (queue active)
Oct 28 14:26:38 localhost postfix/local[24239]: ED17C231BD: 
to=, relay=local, delay=27, 
delays=27/0.07/0/0.11, dsn=5.1.1, status=bounced (unknown user: "fax-3653311")
Oct 28 14:26:38 localhost postfix/cleanup[24238]: 822012381C: 
message-id=<20141028182638.8220123...@aafax.adventureaquarium.com>
Oct 28 14:26:38 localhost postfix/qmgr[24234]: 822012381C: from=<>, size=2278, 
nrcpt=1 (queue active)
Oct 28 14:26:38 localhost postfix/bounce[24240]: ED17C231BD: sender 
non-delivery notification: 822012381C
Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: removed
Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused
Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused
Oct 28 14:26:38 localhost postfix/smtp[24242]: 822012381C: 
to=, relay=none, delay=0.25, 
delays=0.07/0.07/0.11/0, dsn=4.4.1, status=deferred (connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused)

Log from sending test to f...@aafax.adventureaquarium.com - this is getting 
dropped in the root mailbox for some reason:
Oct 28 14:20:39 localhost postfix/smtpd[24123]: connect from 
it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:20:59 localhost postfix/smtpd[24123]: DFA99231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:21:15 localhost postfix/cleanup[24125]: DFA99231BD: message-id=<>
Oct 28 14:21:15 localhost postfix/qmgr[24117]: DFA99231BD: 
from=, size=284, nrcpt=1 (queue active)
Oct 28 14:21:15 localhost postfix/local[24126]: DFA99231BD: 
to=, 
orig_to=, relay=local, delay=27, 
delays=27/0.07/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
Oct 28 14:21:15 localhost postfix/qmgr[24117]: DFA99231BD: removed
Oct 28 14:21:39 localhost postfix/smtpd[24123]: 27B25231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]



-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Wietse Venema
Sent: Tuesday, October 28, 2014 1:56 PM
To: Postfix users
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> Sorry I missed those links (they helped). 
> Looks like it's trying to send all the email off to my main mail 
> server. I've tried changing the transports, virtual and relay settings 
> in master but it's still sending anything formatted as 
> fax-###@aafax.mydomain.com off the server. If it helps I can post 
> my configs or email them off list.

If mail isn't delivered to the pipe command, then you made a mistake with 
transport_maps part, but no-one knows what mistake you made, because you don't 
provide concrete informaton.  Vague eyewitness reports are useless.

Wietse

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html

Thank you for using Postfix.


This message has been scanned for malware by Websense. www.websense.com


Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> transport:
> @aafax.adventureaquarium.com fax:

I wrote:

/etc/postfix/transport:
aafax.mydomain.com fax:


Wietse

> relay_recipients:
> @aafax.adventureaquarium.com does-not-matter
> 
> 
> Log from trying to send a test to fax-3653...@aafax.adventureaquarium.com:
> 
> Oct 28 14:26:01 localhost postfix/smtpd[24236]: connect from 
> it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:26 localhost postfix/smtpd[24236]: ED17C231BD: 
> client=it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:38 localhost postfix/cleanup[24238]: ED17C231BD: message-id=<>
> Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: 
> from=, size=299, nrcpt=1 (queue active)
> Oct 28 14:26:38 localhost postfix/local[24239]: ED17C231BD: 
> to=, relay=local, delay=27, 
> delays=27/0.07/0/0.11, dsn=5.1.1, status=bounced (unknown user: "fax-3653311")
> Oct 28 14:26:38 localhost postfix/cleanup[24238]: 822012381C: 
> message-id=<20141028182638.8220123...@aafax.adventureaquarium.com>
> Oct 28 14:26:38 localhost postfix/qmgr[24234]: 822012381C: from=<>, 
> size=2278, nrcpt=1 (queue active)
> Oct 28 14:26:38 localhost postfix/bounce[24240]: ED17C231BD: sender 
> non-delivery notification: 822012381C
> Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: removed
> Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
> cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused
> Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
> cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused
> Oct 28 14:26:38 localhost postfix/smtp[24242]: 822012381C: 
> to=, relay=none, delay=0.25, 
> delays=0.07/0.07/0.11/0, dsn=4.4.1, status=deferred (connect to 
> cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused)
> 
> Log from sending test to f...@aafax.adventureaquarium.com - this is getting 
> dropped in the root mailbox for some reason:
> Oct 28 14:20:39 localhost postfix/smtpd[24123]: connect from 
> it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:20:59 localhost postfix/smtpd[24123]: DFA99231BD: 
> client=it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:21:15 localhost postfix/cleanup[24125]: DFA99231BD: message-id=<>
> Oct 28 14:21:15 localhost postfix/qmgr[24117]: DFA99231BD: 
> from=, size=284, nrcpt=1 (queue active)
> Oct 28 14:21:15 localhost postfix/local[24126]: DFA99231BD: 
> to=, 
> orig_to=, relay=local, delay=27, 
> delays=27/0.07/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
> Oct 28 14:21:15 localhost postfix/qmgr[24117]: DFA99231BD: removed
> Oct 28 14:21:39 localhost postfix/smtpd[24123]: 27B25231BD: 
> client=it5.aaq.hfecorp.local[10.252.0.137]
> 
> 
> 
> -Original Message-
> From: owner-postfix-us...@postfix.org 
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema
> Sent: Tuesday, October 28, 2014 1:56 PM
> To: Postfix users
> Subject: Re: Migrating to postfix
> 
> Jason Staudenmayer:
> > Sorry I missed those links (they helped). 
> > Looks like it's trying to send all the email off to my main mail 
> > server. I've tried changing the transports, virtual and relay settings 
> > in master but it's still sending anything formatted as 
> > fax-###@aafax.mydomain.com off the server. If it helps I can post 
> > my configs or email them off list.
> 
> If mail isn't delivered to the pipe command, then you made a mistake with 
> transport_maps part, but no-one knows what mistake you made, because you 
> don't provide concrete informaton.  Vague eyewitness reports are useless.
> 
>   Wietse
> 
> TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail
> 
> TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html
> 
> Thank you for using Postfix.
> 
> 
> This message has been scanned for malware by Websense. www.websense.com
> 


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
Typo, I fixed that and tried again.

Oct 28 14:47:19 localhost postfix/qmgr[24359]: 3ECA6236C8: from=<>, size=2267, 
nrcpt=1 (queue active)
Oct 28 14:47:19 localhost postfix/smtp[24361]: connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused
Oct 28 14:47:19 localhost postfix/smtp[24361]: connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused
Oct 28 14:47:19 localhost postfix/smtp[24361]: 3ECA6236C8: 
to=, relay=none, delay=1947, 
delays=1946/0.12/0.11/0, dsn=4.4.1, status=deferred (connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused)
Oct 28 14:47:30 localhost postfix/smtpd[24364]: connect from 
it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:47:59 localhost postfix/smtpd[24364]: 8A330231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:48:11 localhost postfix/cleanup[24366]: 8A330231BD: message-id=<>
Oct 28 14:48:11 localhost postfix/qmgr[24359]: 8A330231BD: 
from=, size=295, nrcpt=1 (queue active)
Oct 28 14:48:11 localhost postfix/local[24367]: 8A330231BD: 
to=, relay=local, delay=30, 
delays=30/0.07/0/0.1, dsn=5.1.1, status=bounced (unknown user: "fax-3653311")
Oct 28 14:48:11 localhost postfix/cleanup[24366]: CAEDE23828: 
message-id=<20141028184811.caede23...@aafax.adventureaquarium.com>
Oct 28 14:48:11 localhost postfix/qmgr[24359]: CAEDE23828: from=<>, size=2274, 
nrcpt=1 (queue active)
Oct 28 14:48:11 localhost postfix/bounce[24368]: 8A330231BD: sender 
non-delivery notification: CAEDE23828
Oct 28 14:48:11 localhost postfix/qmgr[24359]: 8A330231BD: removed
Oct 28 14:48:11 localhost postfix/smtp[24361]: connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused
Oct 28 14:48:12 localhost postfix/smtp[24361]: connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused
Oct 28 14:48:12 localhost postfix/smtp[24361]: CAEDE23828: 
to=, relay=none, delay=0.18, 
delays=0.06/0.02/0.11/0, dsn=4.4.1, status=deferred (connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused)
Oct 28 14:48:40 localhost postfix/smtpd[24364]: C41DA231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:48:52 localhost postfix/cleanup[24366]: C41DA231BD: message-id=<>
Oct 28 14:48:52 localhost postfix/qmgr[24359]: C41DA231BD: 
from=, size=288, nrcpt=1 (queue active)
Oct 28 14:48:52 localhost postfix/local[24367]: C41DA231BD: 
to=, 
orig_to=, relay=local, delay=24, 
delays=24/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
Oct 28 14:48:52 localhost postfix/qmgr[24359]: C41DA231BD: removed
Oct 28 14:48:54 localhost postfix/smtpd[24364]: disconnect from 
it5.aaq.hfecorp.local[10.252.0.137]

Looks like it still doing the same thing

-Original Message-
From: Wietse Venema [mailto:wie...@porcupine.org] 
Sent: Tuesday, October 28, 2014 2:46 PM
To: Jason Staudenmayer
Cc: Postfix users
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> transport:
> @aafax.adventureaquarium.com fax:

I wrote:

/etc/postfix/transport:
aafax.mydomain.com fax:


Wietse

> relay_recipients:
> @aafax.adventureaquarium.com does-not-matter
> 
> 
> Log from trying to send a test to fax-3653...@aafax.adventureaquarium.com:
> 
> Oct 28 14:26:01 localhost postfix/smtpd[24236]: connect from 
> it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:26 localhost postfix/smtpd[24236]: ED17C231BD: 
> client=it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:38 localhost postfix/cleanup[24238]: ED17C231BD: 
> message-id=<> Oct 28 14:26:38 localhost postfix/qmgr[24234]: 
> ED17C231BD: from=, size=299, nrcpt=1 
> (queue active) Oct 28 14:26:38 localhost postfix/local[24239]: 
> ED17C231BD: to=, relay=local, 
> delay=27, delays=27/0.07/0/0.11, dsn=5.1.1, status=bounced (unknown 
> user: "fax-3653311") Oct 28 14:26:38 localhost postfix/cleanup[24238]: 
> 822012381C: 
> message-id=<20141028182638.8220123...@aafax.adventureaquarium.com>
> Oct 28 14:26:38 localhost postfix/qmgr[24234]: 822012381C: from=<>, 
> size=2278, nrcpt=1 (queue active) Oct 28 14:26:38 localhost 
> postfix/bounce[24240]: ED17C231BD: sender non-delivery notification: 
> 822012381C Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: 
> removed Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
> cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused 
> Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to 
> cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused 
> Oct 28 14:26:38 localhost postfix/smtp[24242]: 822012381C: 
> to=, relay=none, delay=0.25, 
> delays=0.07/0.07/0.11/0, dsn=4.4.1, status=deferred (connect to 
> cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused)
> 
> Log from sending test to f...@aafax.adventureaquarium.com - this is getting 
> dropped in the root mailbox for some reason:
> Oct 28 14:20:39 localhost postfix/smtpd[24123]: connect from 
> it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:20:59 localhost postfix/smtpd[24123]: DFA

Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> Oct 28 14:48:11 localhost postfix/local[24367]: 8A330231BD: 
> to=, relay=local, delay=30, 
> delays=30/0.07/0/0.1, dsn=5.1.1, status=bounced (unknown user: "CENSORED311")

You have mis-configured MYDESTINATION in main.cf, therefore
mail goes to the LOCAL daemon instead of the PIPE daemon.

Wietse


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
Ok I found why it's dumping fax@ email to root, /etc/aliases had a default 
entry for fax:
Still not taking addresses in the format fax-(phonenumber)@

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Jason Staudenmayer
Sent: Tuesday, October 28, 2014 2:51 PM
To: Wietse Venema
Cc: postfix-users@postfix.org
Subject: RE: Migrating to postfix

Typo, I fixed that and tried again.

Oct 28 14:47:19 localhost postfix/qmgr[24359]: 3ECA6236C8: from=<>, size=2267, 
nrcpt=1 (queue active) Oct 28 14:47:19 localhost postfix/smtp[24361]: connect 
to cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused Oct 28 
14:47:19 localhost postfix/smtp[24361]: connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused Oct 28 
14:47:19 localhost postfix/smtp[24361]: 3ECA6236C8: 
to=, relay=none, delay=1947, 
delays=1946/0.12/0.11/0, dsn=4.4.1, status=deferred (connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused) Oct 28 
14:47:30 localhost postfix/smtpd[24364]: connect from 
it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:47:59 localhost postfix/smtpd[24364]: 8A330231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:48:11 localhost postfix/cleanup[24366]: 8A330231BD: message-id=<> Oct 
28 14:48:11 localhost postfix/qmgr[24359]: 8A330231BD: 
from=, size=295, nrcpt=1 (queue active) Oct 28 
14:48:11 localhost postfix/local[24367]: 8A330231BD: 
to=, relay=local, delay=30, 
delays=30/0.07/0/0.1, dsn=5.1.1, status=bounced (unknown user: "fax-3653311") 
Oct 28 14:48:11 localhost postfix/cleanup[24366]: CAEDE23828: 
message-id=<20141028184811.caede23...@aafax.adventureaquarium.com>
Oct 28 14:48:11 localhost postfix/qmgr[24359]: CAEDE23828: from=<>, size=2274, 
nrcpt=1 (queue active) Oct 28 14:48:11 localhost postfix/bounce[24368]: 
8A330231BD: sender non-delivery notification: CAEDE23828 Oct 28 14:48:11 
localhost postfix/qmgr[24359]: 8A330231BD: removed Oct 28 14:48:11 localhost 
postfix/smtp[24361]: connect to 
cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused Oct 28 
14:48:12 localhost postfix/smtp[24361]: connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused Oct 28 
14:48:12 localhost postfix/smtp[24361]: CAEDE23828: 
to=, relay=none, delay=0.18, 
delays=0.06/0.02/0.11/0, dsn=4.4.1, status=deferred (connect to 
cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused) Oct 28 
14:48:40 localhost postfix/smtpd[24364]: C41DA231BD: 
client=it5.aaq.hfecorp.local[10.252.0.137]
Oct 28 14:48:52 localhost postfix/cleanup[24366]: C41DA231BD: message-id=<> Oct 
28 14:48:52 localhost postfix/qmgr[24359]: C41DA231BD: 
from=, size=288, nrcpt=1 (queue active) Oct 28 
14:48:52 localhost postfix/local[24367]: C41DA231BD: 
to=, 
orig_to=, relay=local, delay=24, 
delays=24/0.01/0/0.06, dsn=2.0.0, status=sent (delivered to maildir) Oct 28 
14:48:52 localhost postfix/qmgr[24359]: C41DA231BD: removed Oct 28 14:48:54 
localhost postfix/smtpd[24364]: disconnect from 
it5.aaq.hfecorp.local[10.252.0.137]

Looks like it still doing the same thing

-Original Message-
From: Wietse Venema [mailto:wie...@porcupine.org]
Sent: Tuesday, October 28, 2014 2:46 PM
To: Jason Staudenmayer
Cc: Postfix users
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> transport:
> @aafax.adventureaquarium.com fax:

I wrote:

/etc/postfix/transport:
aafax.mydomain.com fax:


Wietse

> relay_recipients:
> @aafax.adventureaquarium.com does-not-matter
> 
> 
> Log from trying to send a test to fax-3653...@aafax.adventureaquarium.com:
> 
> Oct 28 14:26:01 localhost postfix/smtpd[24236]: connect from 
> it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:26 localhost postfix/smtpd[24236]: ED17C231BD: 
> client=it5.aaq.hfecorp.local[10.252.0.137]
> Oct 28 14:26:38 localhost postfix/cleanup[24238]: ED17C231BD: 
> message-id=<> Oct 28 14:26:38 localhost postfix/qmgr[24234]: 
> ED17C231BD: from=, size=299, nrcpt=1 
> (queue active) Oct 28 14:26:38 localhost postfix/local[24239]:
> ED17C231BD: to=, relay=local, 
> delay=27, delays=27/0.07/0/0.11, dsn=5.1.1, status=bounced (unknown
> user: "fax-3653311") Oct 28 14:26:38 localhost postfix/cleanup[24238]: 
> 822012381C: 
> message-id=<20141028182638.8220123...@aafax.adventureaquarium.com>
> Oct 28 14:26:38 localhost postfix/qmgr[24234]: 822012381C: from=<>, 
> size=2278, nrcpt=1 (queue active) Oct 28 14:26:38 localhost
> postfix/bounce[24240]: ED17C231BD: sender non-delivery notification: 
> 822012381C Oct 28 14:26:38 localhost postfix/qmgr[24234]: ED17C231BD: 
> removed Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to
> cust12182-2.in.mailcontrol.com[208.87.234.190]:25: Connection refused 
> Oct 28 14:26:38 localhost postfix/smtp[24242]: connect to
> cust12182-1.in.mailcontrol.com[208.87.233.190]:25: Connection refused 
> Oct 28 14:26:38 localhost postfix/smtp[24242]: 822012381C:
> to=, relay=none, delay=0.25, 
> 

Re: Migrating to postfix

2014-10-28 Thread Wietse Venema
Jason Staudenmayer:
> Ok I found why it's dumping fax@ email to root, /etc/aliases had a default 
> entry for fax:
> Still not taking addresses in the format fax-(phonenumber)@

DO NOT LIST the faxdomain in MYDESTINATION

Wietse


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
SO it should have just the localhost or should it be empty?

-Original Message-
From: Wietse Venema [mailto:wie...@porcupine.org] 
Sent: Tuesday, October 28, 2014 3:28 PM
To: Jason Staudenmayer
Cc: Wietse Venema; postfix-users@postfix.org
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> Ok I found why it's dumping fax@ email to root, /etc/aliases had a default 
> entry for fax:
> Still not taking addresses in the format fax-(phonenumber)@

DO NOT LIST the faxdomain in MYDESTINATION

Wietse


This message has been scanned for malware by Websense. www.websense.com


RE: Migrating to postfix

2014-10-28 Thread Jason Staudenmayer
Wait I think I got working now

-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Jason Staudenmayer
Sent: Tuesday, October 28, 2014 3:34 PM
To: Wietse Venema
Cc: postfix-users@postfix.org
Subject: RE: Migrating to postfix

SO it should have just the localhost or should it be empty?

-Original Message-
From: Wietse Venema [mailto:wie...@porcupine.org] 
Sent: Tuesday, October 28, 2014 3:28 PM
To: Jason Staudenmayer
Cc: Wietse Venema; postfix-users@postfix.org
Subject: Re: Migrating to postfix

Jason Staudenmayer:
> Ok I found why it's dumping fax@ email to root, /etc/aliases had a default 
> entry for fax:
> Still not taking addresses in the format fax-(phonenumber)@

DO NOT LIST the faxdomain in MYDESTINATION

Wietse


This message has been scanned for malware by Websense. www.websense.com


virtual_alias table rewrite and before_queue content filter

2014-10-28 Thread Chad M Stewart

I'm trying to get postfix --smtp--> amavisd --lmtp--> dovecot all setup and 
working nicely together.  I've configured amavisd as a before_queue filter in 
Postfix.

smtpd pass  -   -   n   -   20   smtpd
-o smtpd_proxy_filter=127.0.0.1:10024
-o smtpd_client_connection_count_limit=10
-o smtpd_proxy_options=speed_adjust


If I send a message to a recipient's address that is found via 
virtual_mailbox_map then that same address is passed to the before_queue 
filter.  If I send a message to a recipient's address that is found via 
virtual_alias_maps, then the alias address is passed instead of the result of 
the lookup.

Both maps are setup to use LDAP, both maps are identical.

[root@mta03 /opt/local/etc/postfix]# cat ldap_virtual_alias_maps.cf 
server_host = ldap://ldapserver/
search_base = dc=coyp
version = 3
bind = yes
bind_dn = cn=user,dc=coyp
bind_pw = ***
query_filter = 
(&(ObjectClass=inetLocalMailRecipient)(|(mail=%s)(mailLocalAddress=%s)))
result_format = %s
result_attribute = mail


Here are the headers from a message sent without the content filter in place

> Received: from relay.coyp.dc ([10.0.0.52])
> by localhost (Dovecot) with LMTP id UvV1MIg9UFQBTQAA0J78UA
> for ; Wed, 29 Oct 2014 01:06:16 +
   -- found via mailbox lookup
> Received: from chad (unknown [10.0.0.171])
> by relay.coyp.dc (Postfix) with SMTP id 3jSBRz3dL9zfq6
> for ; Tue, 28 Oct 2014 20:06:07 -0500 (CDT)
  ^^ -- found via alias lookup


Can I get Postfix to do the alias lookup and substitution before sending to the 
content filter?


Thank you,
Chad




Re: virtual_alias table rewrite and before_queue content filter

2014-10-28 Thread Viktor Dukhovni
On Tue, Oct 28, 2014 at 08:23:15PM -0500, Chad M Stewart wrote:

> I'm trying to get postfix --smtp--> amavisd --lmtp--> dovecot all setup
> and working nicely together.  I've configured amavisd as a before_queue
> filter in Postfix.

That's fine, but address rewriting happens in cleanup(8) which writes
the queue-file, so no rewriting happens in before-queue SMTP servers.

> Can I get Postfix to do the alias lookup and substitution before sending to 
> the content filter?

No, because you're not using a (post-queue) content filter, you're
using a pre-queue proxy filter.

-- 
Viktor.


Re: virtual_alias table rewrite and before_queue content filter

2014-10-28 Thread Chad M Stewart
Thanks Viktor.  I know I've read that before but I deal with about 3 different 
MTAs in a given week, so I don't always remember all the in/outs of each.  :)


-Chad



On Oct 28, 2014, at 8:52 PM, Viktor Dukhovni  wrote:

> On Tue, Oct 28, 2014 at 08:23:15PM -0500, Chad M Stewart wrote:
> 
>> I'm trying to get postfix --smtp--> amavisd --lmtp--> dovecot all setup
>> and working nicely together.  I've configured amavisd as a before_queue
>> filter in Postfix.
> 
> That's fine, but address rewriting happens in cleanup(8) which writes
> the queue-file, so no rewriting happens in before-queue SMTP servers.
> 
>> Can I get Postfix to do the alias lookup and substitution before sending to 
>> the content filter?
> 
> No, because you're not using a (post-queue) content filter, you're
> using a pre-queue proxy filter.
> 
> -- 
>   Viktor.