LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Problem with Postfix (process smtpd exit status 1) (https://www.linuxquestions.org/questions/linux-server-73/problem-with-postfix-process-smtpd-exit-status-1-a-629625/)

breiko 03-21-2008 06:08 AM

Problem with Postfix (process smtpd exit status 1)
 
Hi there,
I'm going crazy trying to run a mail server on my slicehost server.
I have followed this how to [link]

but I have problems accessing with squirrel and I thought something was wrong.

Looking at /var/log/mail* I have these errors every action I do with postfixadmin or squirrel:

Code:

Mar 21 11:03:37 rory postfix/smtpd[29308]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.info <==
Mar 21 11:03:37 rory postfix/smtpd[29308]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.log <==
Mar 21 11:03:37 rory postfix/smtpd[29308]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.warn <==
Mar 21 11:03:37 rory postfix/smtpd[29308]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.info <==
Mar 21 11:03:38 rory postfix/master[29286]: warning: process /usr/lib/postfix/smtpd pid 29308 exit status 1
Mar 21 11:03:38 rory postfix/master[29286]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

==> /var/log/mail.log <==
Mar 21 11:03:38 rory postfix/master[29286]: warning: process /usr/lib/postfix/smtpd pid 29308 exit status 1
Mar 21 11:03:38 rory postfix/master[29286]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

==> /var/log/mail.warn <==
Mar 21 11:03:38 rory postfix/master[29286]: warning: process /usr/lib/postfix/smtpd pid 29308 exit status 1
Mar 21 11:03:38 rory postfix/master[29286]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

I can't figure out what is wrong.. All my config files seems ok but I maybe did some mistake somewhere..

Cheers!

breiko 03-21-2008 06:09 AM

https://help.ubuntu.com/community/Po...temHowto%29%29

.. the how-to I followed..

billymayday 03-21-2008 06:20 AM

It's probably something in master.cf. Can you post /etc/postfix/master.cf and also the output of sudo postconf -n

breiko 03-21-2008 08:21 AM

Of course..

Code:

breiko@rory:~$ sudo cat /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#              (yes)  (yes)  (yes)  (never) (100)
# ==========================================================================
smtp      inet  n      -      -      -      -      smtpd
#submission inet n      -      -      -      -      smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps    inet  n      -      -      -      -      smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n      -      -      -      -      qmqpd
pickup    fifo  n      -      -      60      1      pickup
cleanup  unix  n      -      -      -      0      cleanup
qmgr      fifo  n      -      n      300    1      qmgr
#qmgr    fifo  n      -      -      300    1      oqmgr
tlsmgr    unix  -      -      -      1000?  1      tlsmgr
rewrite  unix  -      -      -      -      -      trivial-rewrite
bounce    unix  -      -      -      -      0      bounce
defer    unix  -      -      -      -      0      bounce
trace    unix  -      -      -      -      0      bounce
verify    unix  -      -      -      -      1      verify
flush    unix  n      -      -      1000?  0      flush
proxymap  unix  -      -      n      -      -      proxymap
smtp      unix  -      -      -      -      -      smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay    unix  -      -      -      -      -      smtp
        -o smtp_fallback_relay=
#      -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq    unix  n      -      -      -      -      showq
error    unix  -      -      -      -      -      error
retry    unix  -      -      -      -      -      error
discard  unix  -      -      -      -      -      discard
local    unix  -      n      n      -      -      local
virtual  unix  -      n      n      -      -      virtual
lmtp      unix  -      -      -      -      -      lmtp
anvil    unix  -      -      -      -      1      anvil
scache    unix  -      -      -      -      1      scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -      n      n      -      -      pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -      n      n      -      -      pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -      n      n      -      -      pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp    unix  -      n      n      -      -      pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix  -      n      n      -      2      pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman  unix  -      n      n      -      -      pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

Code:

breiko@rory:~$ sudo postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
inet_interfaces = all
mailbox_command =
mailbox_size_limit = 0
mydestination =
myhostname = localhost
mynetworks = all
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service inet
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000


billymayday 03-21-2008 02:35 PM

I'll have a more detailed look a bit later, but most importantly, are you trying to ruin Postfix chrooted? If not, you need to put "n"s in the relevant column in master (take a backup first please).

Eg change

Code:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#              (yes)  (yes)  (yes)  (never) (100)
# ==========================================================================
smtp      inet  n      -      -      -      -      smtpd

to

Code:

# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#              (yes)  (yes)  (yes)  (never) (100)
# ==========================================================================
smtp      inet  n      -      n      -      -      smtpd

Also, myorigin should be a domain such as example.com.

As I said, I'll have a better look later. Don't forget to restart Postfix after changing master.cf.

breiko 03-21-2008 05:54 PM

What I am trying to do is to create a Virtual Mail System.. this is the howto I followed (previous one was wrong, sorry about that): https://help.ubuntu.com/community/Po...ailSystemHowto

Quote:

are you trying to ruin Postfix chrooted?
Yes, I'm trying to run postfix chrooted.

Quote:

Also, myorigin should be a domain such as example.com.
I found something here, myhostname was localhost instead of mail.domain.com .
I have done this but still the same results:

Code:

==> /var/log/mail.err <==
Mar 21 22:44:57 rory postfix/smtpd[32331]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.info <==
Mar 21 22:44:57 rory postfix/smtpd[32331]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.log <==
Mar 21 22:44:57 rory postfix/smtpd[32331]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.warn <==
Mar 21 22:44:57 rory postfix/smtpd[32331]: fatal: need service transport:endpoint instead of "inet"

==> /var/log/mail.info <==
Mar 21 22:44:58 rory postfix/master[32312]: warning: process /usr/lib/postfix/smtpd pid 32331 exit status 1
Mar 21 22:44:58 rory postfix/master[32312]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

==> /var/log/mail.log <==
Mar 21 22:44:58 rory postfix/master[32312]: warning: process /usr/lib/postfix/smtpd pid 32331 exit status 1
Mar 21 22:44:58 rory postfix/master[32312]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

==> /var/log/mail.warn <==
Mar 21 22:44:58 rory postfix/master[32312]: warning: process /usr/lib/postfix/smtpd pid 32331 exit status 1
Mar 21 22:44:58 rory postfix/master[32312]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling


billymayday 03-22-2008 07:31 AM

I still think it's a chroot issue. Looking at the chroot troubleshooting at www.postfix.org, they suggest taking of copy master.cf and de-chrooting the working copy. I'd certainly give that a go first - if it works great, if not, at least you've ruled out a possible cause.

billymayday 03-22-2008 07:50 AM

Stupid question, but you did populate all the mysql tables referred to by postfix didn't you?

farslayer 03-22-2008 01:21 PM

And when you run postfix check, it shows no errors in your config ? sometimes that will point you to a simple error in your config..

breiko 03-24-2008 08:53 AM

Quote:

Originally Posted by billymayday (Post 3096817)
Stupid question, but you did populate all the mysql tables referred to by postfix didn't you?

Yes, the tables are been populated by postfixadmin.

Quote:

Originally Posted by billymayday (Post 3096817)
And when you run postfix check, it shows no errors in your config ? sometimes that will point you to a simple error in your config..

Postfix check doesn't show any errors.


So, I tried to rewrite all the config files after installing postfix again. This seems to fix some problems but after I created a domain and a mailbox I can't connect with squirrelmail to the mailbox.
What I can't do is configure squirrelmail to access the mysql db where postfixadmin saved mailbox data.

Error connecting to IMAP server: localhost.
111 : Connection refused

billymayday 03-24-2008 03:55 PM

When you set up postfix, get a basic setup working, then add components one at a time if possible. Squirrelmail shouldn't be an issue intul everything else works.

That said, did you run the config program for squirrelmail (conf.pl)

breiko 03-25-2008 05:53 AM

Quote:

Originally Posted by billymayday (Post 3099127)
When you set up postfix, get a basic setup working, then add components one at a time if possible. Squirrelmail shouldn't be an issue intul everything else works.

That said, did you run the config program for squirrelmail (conf.pl)

You are absolutely right. Actually I don't see anymore the exit status 1 error but I'm not sure that all the things works.

So, if all is right I should be able to connect throw telnet and send an email (I suppose) but I can't.

Code:

breiko@starlight:~> telnet mail.MYDOMAIN.com 25
Trying 67.207.139.163...
Connected to mail.MYDOMAIN.com.
Escape character is '^]'.
220 mail.domain.com ESMTP Postfix (Ubuntu)
mail from: info@MYDOMAIN.com
250 2.1.0 Ok
rcpt to: carlo.etc@gmail.com
554 5.7.1 <carlo.etc@gmail.com>: Relay access denied

What happened? Why this relay access denied?

billymayday 03-25-2008 06:23 AM

I suspect mynetworks = all is not a valid setting (at least I can't see anything on the docs to suggest it is).

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

Try fixing that one up - you could leave it blank and rely on mynetworks_style if you don't have an external IP connected - but I suspect you do. Be careful you don't create an open relay here.

breiko 03-25-2008 12:15 PM

Quote:

Originally Posted by billymayday (Post 3099668)
I suspect mynetworks = all is not a valid setting (at least I can't see anything on the docs to suggest it is).

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

Try fixing that one up - you could leave it blank and rely on mynetworks_style if you don't have an external IP connected - but I suspect you do. Be careful you don't create an open relay here.

What do you mean with don't create an open relay? I tried to fix as you suggested but I got always the same error. Relay access denied.

breiko 03-25-2008 12:20 PM

Quote:

Originally Posted by breiko (Post 3100030)
What do you mean with don't create an open relay? I tried to fix as you suggested but I got always the same error. Relay access denied.

Ok. I think I did something stupid. I received this notification:

This is an automatic notification to let you know the IP Address 67... has been placed on one or more block-lists (see below):
http://cbl.abuseat.org/faq.html


All times are GMT -5. The time now is 09:07 PM.