Postfix doesn't receive email

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix doesn't receive email

Paulo J. Matos-2
Hello all,

I am not really sure this is a postfix problem but here it is.
I am fetching email with fetchmail and sending it to postfix. Postfix
seems to be working well with regard to smtp, which means I can send
email through sendmail.

Regarding fetchmail I have the line in config file: smtphost localhost

When I run fetchmail I get:
...
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 626 GmailId107030f352db3292
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 627 GmailId10703254c14ea1aa
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 628 GmailId107037da3db82e71
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 629 GmailId107039df62af03be
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 630 GmailId10703a16576f6dcc
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< 631 GmailId107047bbdfcbf0c4
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< .
Jul 11 11:34:09 socrates fetchmail[3717]: 631 messages for
[hidden email] at pop.gmail.com (9164963 octets).
Jul 11 11:34:09 socrates fetchmail[3717]: POP3> LIST 1
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< +OK 1 6395
Jul 11 11:34:09 socrates fetchmail[3717]: POP3> RETR 1
Jul 11 11:34:09 socrates fetchmail[3717]: POP3< +OK message follows
Jul 11 11:34:09 socrates fetchmail[3717]: reading message
[hidden email]@pop.gmail.com:1 of 631 (6395 octets)
Jul 11 11:34:09 socrates fetchmail[3717]: Trying to connect to
127.0.0.1/25...connection failed.
Jul 11 11:34:09 socrates fetchmail[3717]: connection to localhost:smtp
[127.0.0.1/25] failed: Connection refused.
Jul 11 11:34:09 socrates fetchmail[3717]: Trying to connect to
::1/25...cannot create socket: Address family not supported by
protocol
Jul 11 11:34:09 socrates fetchmail[3717]: SMTP connect to localhost failed
Jul 11 11:34:09 socrates fetchmail[3717]: POP3> QUIT

In fact I can't telnet port 25 of localhost. So I would guess that it
is postfix that should be listening and it is not but I also don't
know what the problem might be or which config file should handle
this.

Any suggestion? (By the way, does anyone know if since fetchmail
failed, those mails will be re-downloaded from the pop server?)

TIA,
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
Reply | Threaded
Open this post in threaded view
|

Re: Postfix doesn't receive email

Magnus Bäck
On Friday, July 11, 2008 at 12:40 CEST,
     "Paulo J. Matos" <[hidden email]> wrote:

> I am not really sure this is a postfix problem but here it is.
> I am fetching email with fetchmail and sending it to postfix. Postfix
> seems to be working well with regard to smtp, which means I can send
> email through sendmail.
>
> Regarding fetchmail I have the line in config file: smtphost localhost
>
> When I run fetchmail I get:

[...]

> Jul 11 11:34:09 socrates fetchmail[3717]: Trying to connect to
> 127.0.0.1/25...connection failed.
> Jul 11 11:34:09 socrates fetchmail[3717]: connection to localhost:smtp
> [127.0.0.1/25] failed: Connection refused.
> Jul 11 11:34:09 socrates fetchmail[3717]: Trying to connect to
> ::1/25...cannot create socket: Address family not supported by
> protocol
> Jul 11 11:34:09 socrates fetchmail[3717]: SMTP connect to localhost failed
> Jul 11 11:34:09 socrates fetchmail[3717]: POP3> QUIT
>
> In fact I can't telnet port 25 of localhost. So I would guess that it
> is postfix that should be listening and it is not but I also don't
> know what the problem might be or which config file should handle
> this.

Do you have a firewall running? Show the output of the following
commands:

postconf -n
grep smtpd /etc/postfix/master.cf
netstat -an | grep 25

> Any suggestion? (By the way, does anyone know if since fetchmail
> failed, those mails will be re-downloaded from the pop server?)

Yes. fetchmail does not have a queueing mechanism.

--
Magnus Bäck
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Postfix doesn't receive email

Paulo J. Matos-2
In reply to this post by Paulo J. Matos-2
On Fri, Jul 11, 2008 at 11:52 AM, Magnus Bäck <[hidden email]> wrote:
>
> Do you have a firewall running? Show the output of the following
> commands:
>
> postconf -n
> grep smtpd /etc/postfix/master.cf
> netstat -an | grep 25
>

# postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
disable_dns_lookups = yes
html_directory = /usr/share/doc/postfix-2.5.2/html
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.5.2/readme
relayhost = [smtp.gmail.com]:587
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache
smtp_use_tls = yes
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain = $myhostname
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/FOO-cert.pem
smtpd_tls_key_file = /etc/postfix/FOO-key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

# grep smtpd /etc/postfix/master.cf
#smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

# netstat -an | grep ":25"
Nothing on port 25

I would guess this might be postfix misconfiguration given that
nothing on master.cf is set for smtpd, right?

>> Any suggestion? (By the way, does anyone know if since fetchmail
>> failed, those mails will be re-downloaded from the pop server?)
>
> Yes. fetchmail does not have a queueing mechanism.
>

Thanks!

> --
> Magnus Bäck
> [hidden email]
>
>
>



--
Paulo Jorge Matos - pocm at ecs.soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
Reply | Threaded
Open this post in threaded view
|

Re: Postfix doesn't receive email

Magnus Bäck
On Friday, July 11, 2008 at 13:00 CEST,
     "Paulo J. Matos" <[hidden email]> wrote:

> On Fri, Jul 11, 2008 at 11:52 AM, Magnus Bäck <[hidden email]> wrote:
>
> > Do you have a firewall running? Show the output of the following
> > commands:
> >
> > postconf -n
> > grep smtpd /etc/postfix/master.cf
> > netstat -an | grep 25

[...]

> # grep smtpd /etc/postfix/master.cf
> #smtp      inet  n       -       n       -       -       smtpd

Ah, yes. The SMTP listener is commented out, so Postfix isn't listening
for SMTP connections at all. Uncomment to have it listening on all
network interfaces specified in inet_interfaces. If you only need the
SMTP server for fetchmail submissions you can alter inet_interfaces so
that Postfix only listens on the loopback interface.

http://www.postfix.org/postconf.5.html#inet_interfaces

[...]

--
Magnus Bäck
[hidden email]