Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch)

Discussion in 'HOWTO-Related Questions' started by theMikeroy, Jul 11, 2007.

  1. theMikeroy

    theMikeroy New Member

    Hi =)

    I used the awesome tut Falco's put up at:
    http://www.howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch


    I'm getting a couple of weird errors I cant' seem to track down using this tutorial.

    The host is on Xen (it's a DomU), if that makes a difference.

    For some reason my forwarding stopped. It was working just fine, but it seems to have died about a week ago and I've been trying to troubleshoot it since.

    Here are some clips from the logs: (i replaced the actual domain with *domain.tld* for this forum)

    mail postfix/smtp[2538]: fatal: valid hostname or network address required in server description: *domain.tld*

    I get that ALOT... (thousands in mail.log)
    also:

    postfix/qmgr[1438]: warning: mail for [127.0.0.1]:10024 is using up 19997 of 20000 active queue entries
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: you may need to reduce amavis connect and helo timeouts
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: so that Postfix quickly skips unavailable hosts
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: you may need to increase the main.cf minimal_backoff_time and maximal_backoff_time
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: so that Postfix wastes less time on undeliverable mail
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: you may need to increase the master.cf amavis process limit
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: please avoid flushing the whole queue when you have
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: lots of deferred mail, that is bad for performance
    Jul 10 23:54:43 mail postfix/qmgr[1438]: warning: to turn off these warnings specify: qmgr_clog_warn_time = 0

    Ok, so they tried to send out a mass mailer and it filled the queue... anyway I can empty that without loosing the mail?


    And this may be of interest... It's hard to catch unique errors in the logs because they clog up so fast, but I notice this:

    Jul 10 23:40:59 mail postfix/master[1432]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling

    The client using this server is hosting 2 domains on it and forwarding them. (if that helps)

    I'm sure I've missed something really silly and trivial here...

    Any suggestions are much appreciated =)

    Thanks!
     
    Last edited: Jul 11, 2007
  2. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    postfix check
    and
    Code:
    postconf -n
    ?

    Can you check if your domain can be resolved:
    Code:
    dig domain.tld
     
  3. theMikeroy

    theMikeroy New Member

    Hey Falco, thanks for the reply

    mail:/var/log# postfix check
    mail:/var/log#

    I suppose that means the check was ok?

    I should have posted the postconf -n earlier, my bad... here we go:

    mail:/var/log# 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
    inet_interfaces = all
    mailbox_size_limit = 0
    mydestination = mail.domain1.com, mail.domain2.com, localhost, localhost.localdomain
    myhostname = mail.domain1.com
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relayhost =
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /home/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_uid_maps = static:5000


    the dig definately goes where it should, i've got both A and PTR records working just splendidly.

    I should note that the server has 2 ip's and 2 domains pointed to each IP, and A and PTR records for each working just fine.

    Also, I edited the post, but I can't seem to connect via POP from outside, however I can telnet to the pop port from localhost as the tutorial advises to check if the pop server is responding:

    mail:/var/log# telnet localhost pop3
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    +OK Hello there.
    quit
    +OK Better luck next time.
    Connection closed by foreign host.

    and

    mail:/var/log# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 mail.domain1.com ESMTP Postfix (Debian/GNU)
    ehlo mail.domain1.com
    250-mail.domain1.com
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-AUTH PLAIN LOGIN
    250-AUTH=PLAIN LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    quit
    221 2.0.0 Bye

    *edit*
    I can connect to pop3 from outside, but not port 25:

    $ telnet xx.xx.xx.xx pop3
    Trying xx.xx.xx.xx...
    Connected to mail.domain1.com.
    Escape character is '^]'.
    +OK Hello there.
    quit



    Thanks for the help, you're the mail master =)
     
    Last edited: Jul 11, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    Do you host the server at home or in your office? If so, you should ask your provider if they block port 25.
     
  5. theMikeroy

    theMikeroy New Member

    It's totally not port 25 bring blocked.

    I'm doing it from the office, we're an ISP and I'm the sysadmin who controls the firewall =)

    The crux of the issue, i think, falls in the following errors:
    # tail mail.warn
    Jul 12 15:14:50 mail postfix/smtp[19440]: fatal: valid hostname or network address required in server description: mail.domain1.com
    Jul 12 15:14:51 mail postfix/master[20465]: warning: process /usr/lib/postfix/smtp pid 19440 exit status 1
    Jul 12 15:14:51 mail postfix/master[20465]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
    Jul 12 15:14:51 mail postfix/qmgr[20470]: warning: private/smtp socket: malformed response
    Jul 12 15:14:51 mail postfix/qmgr[20470]: warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description

    and from mail.log:

    Jul 12 15:15:53 mail postfix/error[19537]: 8A2B8173245: to=<*user*@domain2.com>, relay=none, delay=185543, delays=185543/0.05/0/0.04, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]: Connection refused)

    I can't seem to find much help on these issues when i search for 'fatal: valid hostname or network address required in server description'. The 2nd google option is this thread, actually =\
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/mailname, and what's the output of
    Code:
    netstat -tap
    ?
     

Share This Page