access table enhanced smtp status code optional text

2017-10-09 Thread Mp Mptri
Hi,

I use access tables with reject codes and optional status codes and going
to add some optional text. My question is regarding this text:
Are there any restrictions to this in length or special characters? Is
there any rfc document on this?

kind regards,
Michael


Re: Postfix doesn't respect 250-SIZE value

2017-10-09 Thread Matus UHLAR - fantomas

Which suggests that your end (on an RFC1918 IP address of 172.17.25.35)
is behind a NAT firewall, which could part of the problem.  The
SMTP server however does not seem to be reachable from Internet at
large, so the networking topology here is unclear.


On 09.10.17 12:35, Florian Coulmier wrote:

Indeed, only our servers are able to reach this MX. This is the normal behavior.


then it shouldn't be an MX... maybe you mean in-path mail server?


--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory. 


Re: Helo command rejected: Host not found

2017-10-09 Thread Viktor Dukhovni
On Mon, Oct 09, 2017 at 05:04:44PM +0200, Enrico Morelli wrote:

> I'm trying to configure my outlook account to send email through my
> mail server, but I receive the following error:

That would presumably be the STARTTLS submission service on port
587, or perhaps smtps (TLS first then SMTP) port 465.

> InvalidRecipientsException: Invalid recipients were provided for the
> message: 'more...@cerm.unifi.it' (450 4.7.1
> : Helo command rejected:
> Host not found
> 
> Is there a way to put *outlook.com in a "white list"?

Wrong question.  Instead don't filter the helo command at all for
authenticated submission users.  See the commented out sample
master.cf configurations (from the stock master.cf file
distributed with Postfix source) in:

https://github.com/vdukhovni/postfix/blob/master/postfix/conf/master.cf#L17

https://github.com/vdukhovni/postfix/blob/master/postfix/conf/master.cf#L29

-- 
Viktor.


Helo command rejected: Host not found

2017-10-09 Thread Enrico Morelli
I'm trying to configure my outlook account to send email through my
mail server, but I receive the following error:

InvalidRecipientsException: Invalid recipients were provided for the
message: 'more...@cerm.unifi.it' (450 4.7.1
: Helo command rejected:
Host not found

Is there a way to put *outlook.com in a "white list"?

-- 
---
  Enrico Morelli
  System Administrator | Programmer | Web Developer

  CERM - Polo Scientifico
  via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY



Re: Using postfix to forward mail + spamd send to Trash/

2017-10-09 Thread David Woodfall

Hi

I have postfix setup to forward mail to 3 addresses. I also have spamd
working with it so mail gets marked *spam*. I have checked that it
works.

The question is, how do I get it to move spam to a folder rather than
just marking it as spam and still forwarding it?

I know if it's going to a local mailbox I can use procmail for this,
but what about mail that gets forwards?

I've only found info on the web about local procmail use.

Thanks


Well, I did it by taking the forwards out of postfix and used procmail
to do it.



Re: Bounced mails while reloading maps

2017-10-09 Thread Wietse Venema
Julian Kippels:
> Hi,
> 
> I have a cronjob that rebuilds my /etc/postfix/virtual_alias
> and /etc/postfix/virtual_transport files every 15 minutes. I have
> noticed that while the rebuild is going on and all processes realize
> that the files have changed and restart I often get bounced mails.
> 
> For example, this is an excerpt from my log file from today:

See http://www.postfix.org/DATABASE_README.html#safe_db
for updating Berkeley DB safely.

In addition, automatic builds should check that the size of the
source file has not suddenly changed by a lot, before exposing the
new data to Postfix.

Wietse


Re: postfix behind proxy

2017-10-09 Thread Noel Jones
On 10/9/2017 3:52 AM, Toufik SARNI wrote:
> Hello
> 
> I installed gitlab in a virtual machine upon ubuntu 16.04 server.
> This virtual machine is behind my *compagny's proxy.* 
> Postfix is called by gitlab but can not send emails because of
> *proxy -* fails with timeout. I tried many options like
> "proxy_interfaces" in /etc/postfix/main.cf  but none
> of them works.
> Please note that this virtual machine works correctely at home where
> I have not proxy and all emails are sent. 

Timeouts while sending mail are almost always a firewall or network
issue.

Test outgoing connections with "telnet destination 25" where
"destination" is the host postfix is trying to connect to.  If you
get timeouts, check your network and firewall settings, or perhaps
the proxy does not allow outgoing SMTP connections.

If telnet gives a "220 ..." greeting and you need more help with
postfix, please see
http://www.postfix.org/DEBUG_README.html
and particularly
http://www.postfix.org/DEBUG_README.html#mail


Bounced mails while reloading maps

2017-10-09 Thread Julian Kippels
Hi,

I have a cronjob that rebuilds my /etc/postfix/virtual_alias
and /etc/postfix/virtual_transport files every 15 minutes. I have
noticed that while the rebuild is going on and all processes realize
that the files have changed and restart I often get bounced mails.

For example, this is an excerpt from my log file from today:

Oct  9 15:30:27 thor postfix/lsf-relay/smtpd[25537]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/lsf-relay/smtpd[25536]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/lsf-relay/smtpd[25088]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/smtpd[24267]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/smtpd[24239]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/cleanup[26125]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/cleanup[26562]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/lmtp[22259]: 8C49D31180: 
to=, orig_to=, 
relay=none, delay=0.03, delays=0.02/0/0/0, dsn=5.4.4, status=bounced (unable to 
look up host uni-duesseldorf.de: Name or service not known)
Oct  9 15:30:27 thor postfix/submission/smtpd[20882]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:27 thor postfix/submission/smtpd[20973]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:29 thor postfix/submission/smtpd[20853]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:33 thor postfix/trivial-rewrite[26561]: table 
hash:/etc/postfix/virtual_transport(0,lock|no_regsub|fold_fix) has changed -- 
restarting
Oct  9 15:30:34 thor postfix/lmtp[21070]: 9ACD74BD83: 
to=, orig_to=, relay=none, 
delay=0.01, delays=0/0/0/0, dsn=5.4.4, status=bounced (unable to look up host 
uni-duesseldorf.de: Name or service not known)
Oct  9 15:30:36 thor postfix/trivial-rewrite[17489]: table 
hash:/etc/postfix/virtual_transport(0,lock|no_regsub|fold_fix) has changed -- 
restarting
Oct  9 15:30:39 thor postfix/submission/smtpd[20864]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:30:59 thor postfix/smtpd[24159]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:31:02 thor postfix/cleanup[24909]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:31:34 thor postfix/submission/smtpd[20940]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:32:05 thor postfix/submission/smtpd[20874]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting
Oct  9 15:32:08 thor postfix/submission/smtpd[18477]: table 
hash:/etc/postfix/virtual_alias(0,lock|fold_fix) has changed -- restarting

My only idea how to fix this would be modifying the cronjob to hold all mails
before rebuilding the files and releasing all mails after. Is there a better way
or is my setup just stupid?

Obligatory postconf -n:

postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broadcaster_only = check_policy_service inet:localhost:2000
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd 
$daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 4h
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
lmtp_host_lookup = native
local_recipient_maps = $virtual_mailbox_maps
mail_owner = postfix
mailbox_size_limit = 1433600
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 14336
mydestination = $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8 cidr:/etc/postfix/mynetworks-25.cidr
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
propagate_unmatched_extensions =
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
recipient_delimiter = +
relay_domains = ddz.uni-duesseldorf.de mail.ddz.uni-duesseldorf.de 
ddfi.uni-duesseldorf.de mail.ddfi.uni-duesseldorf.de dfi.uni-duesseldorf.de 
mail.ddfi.uni-duesseldorf.de frodo.rz.uni-duesseldorf.de osxpr.fon.hhu.de
relay_recipient_maps = hash:/etc/postfix/relay_recipients
sample_directory = 

Re: Postfix doesn't respect 250-SIZE value

2017-10-09 Thread Florian Coulmier
> Which suggests that your end (on an RFC1918 IP address of 172.17.25.35)
> is behind a NAT firewall, which could part of the problem.  The
> SMTP server however does not seem to be reachable from Internet at
> large, so the networking topology here is unclear.

Indeed, only our servers are able to reach this MX. This is the normal 
behavior. 

> There we have it, the EHLO response omits the first vanity line,
> and so SIZE becomes the vanity line, and is ignored.

This is it! Thanks for the information, I was not aware of this RFC subtlety. 
We’ll reach out to the owner of the MX to see if he can change this behavior.

> This response must follow ".", and the server must not switch back
> to command-mode until that happens.  Just hanging up can cause
> problems.  Mind you, when the connection is lost mid-transfer,
> Postfix will attempt to read any pending premature response 
> from the server (since Postfix 2.4, 11 years ago):

Another RFC breach that we will notify to the postmaster.


Many thanks for the time you all spent on this issue. Your help was precious on 
this one.

Florian





Re: postfix behind proxy

2017-10-09 Thread Erwan David
Le 10/09/17 à 10:52, Toufik SARNI a écrit :
> Hello
> 
> I installed gitlab in a virtual machine upon ubuntu 16.04 server. This
> virtual machine is behind my *compagny's proxy.* 
> Postfix is called by gitlab but can not send emails because of *proxy
> -* fails with timeout. I tried many options like "proxy_interfaces" in
> /etc/postfix/main.cf  but none of them works.
> Please note that this virtual machine works correctely at home where I
> have not proxy and all emails are sent. 
> 
> Thanks and best regards,
> Toufik

Maybe your company provides an internal smtp host, that your postfix
could use as a relay. Company proxys usually deal only with HTTP and HTTPS.


postfix behind proxy

2017-10-09 Thread Toufik SARNI
Hello

I installed gitlab in a virtual machine upon ubuntu 16.04 server. This
virtual machine is behind my *compagny's proxy.*
Postfix is called by gitlab but can not send emails because of *proxy -* fails
with timeout. I tried many options like "proxy_interfaces" in /etc/postfix/
main.cf but none of them works.
Please note that this virtual machine works correctely at home where I have
not proxy and all emails are sent.

Thanks and best regards,
Toufik

  /\  /\
   __   \/   __
  .  /_  _   \   .
 | \ |  ( o ) ( o )  | / |
+-.OOOooooOOO.+
| *** Please consider the environment before printing this e-mail!  |
|Avant d'imprimer, ayez une pensée pour notre environnement!|
+Oooo.+
 .oooO  ( )
( )  )  /
 \  (   ( _ /
  \ _ )