postfix - myhostname, mydoman problem

Discussion in 'Server Operation' started by adam, Sep 19, 2006.

  1. adam

    adam New Member

    I have vhcs2 setup with several virtual domains.

    My postfix log keeps reporting the following error:

    Sep 19 12:00:01 viking postfix/trivial-rewrite[32391]: warning: do not list domain in BOTH mydestination and virtual_mailbox_domains
    Sep 19 12:11:51 viking postfix/trivial-rewrite[782]: warning: do not list domain in BOTH mydestination and virtual_mailbox_domains
    Sep 19 12:18:31 viking postfix/virtual[2012]: fatal: gethostbyname: Success
    Sep 19 12:18:32 viking postfix/qmgr[31125]: warning: premature end-of-input on private/virtual socket while reading input attribute name
    Sep 19 12:18:32 viking postfix/qmgr[31125]: warning: private/virtual socket: malformed response
    Sep 19 12:18:32 viking postfix/qmgr[31125]: warning: transport virtual failure -- see a previous warning/fatal/panic logfile record for the problem description

    in my file I have set the following because of some of my mails being reject with an incorrect HELO statement.

    #myhostname = viking
    myhostname =
    #mydomain = viking.local
    mydomain =
    myorigin = $mydomain
    Now, my server hostname is called "" and my reversedns is ""

    In my vhcs2 domains file i have one of many other vdmn_entry records which reads:
    Code:                     vdmn_entry
    Bearing in mind that i use a few other virtual hosts with completely different names, what do i need to do to stop the above error happening in postfix mail.warn? I don't *seem* to have a problem sending or receiving emails but i'd like to stop the warning anyway.

    Is the above warning a problem?
  2. adam

    adam New Member


    myhostname = viking
    mydomain = viking.local

    i've had to put it back like this for now becuase the emails stopped working.

    But the HELO tag reads just "viking" instead of "".

    Any ideas how i can fix this without interferring with the virtual hosting domain?
  3. falko

    falko Super Moderator ISPConfig Developer

    Change myhostname back to
    myhostname =
    What's in mydestination? Maybe you can post the full here (please strip out the comments)?
  4. adam

    adam New Member

    command_directory = /usr/sbin
    daemon_directory = /usr/lib/postfix
    program_directory = /usr/lib/postfix
    inet_interfaces = all
    mynetworks_style = host
    #mynetworks =,
    myhostname =
    mydomain = viking.local
    myorigin = $mydomain
    smtpd_banner = $myhostname VHCS2 2.4 Spartacus Managemydestination = $myhostname, $mydomain
    append_dot_mydomain = no
    append_at_myorigin = yes
    local_transport = local
    virtual_transport = virtual
    transport_maps = hash:/etc/postfix/vhcs2/transport
    d ESMTP
    setgid_group = postdrop
    mail_spool_directory = /var/mail
    mailbox_size_limit = 0
    mailbox_command = procmail -a "$EXTENSION"
    biff = no
    alias_database = hash:/etc/aliases
    alias_maps = $alias_database
    local_destination_recipient_limit = 1
    local_recipient_maps = unix:passwd.byname $alias_database
    virtual_mailbox_base = /var/mail/virtual
    virtual_mailbox_limit = 0
    virtual_mailbox_domains = hash:/etc/postfix/vhcs2/domains
    virtual_mailbox_maps = hash:/etc/postfix/vhcs2/mailboxes
    virtual_alias_maps = hash:/etc/postfix/vhcs2/aliases
    virtual_minimum_uid = 1002
    virtual_uid_maps = static:1002
    virtual_gid_maps = static:8
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain =
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions =
    #added for clamav and spamassassin by vhcs installation script made by Wael Nasreddine
    content_filter = smtp-amavis:[]:10024
    I did what you said and it's working better now. I still have a strange problem that I've recived mail from people and its come trhough as "[email protected]" which is weird.
  5. falko

    falko Super Moderator ISPConfig Developer

    There's no mydestination line in your What's the output of
    postconf -d | grep mydestination
  6. adam

    adam New Member

    mydestination = $myhostname, $mydomain

    sorry, i must have accidentally missed it when cutting and pasting.
    result of that command is

    mydestination = $myhostname, localhost.$mydomain, localhost
    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
    relay_domains = $mydestination
  7. falko

    falko Super Moderator ISPConfig Developer

    Please run
    postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost'
    postconf -e 'myhostname ='
    postconf -e 'mydomain = $myhostname'
    and restart Postfix afterwards.
  8. adam

    adam New Member

    Thanks , Falko. Everything seems to be perfect now.

    I'd like to express my gratitude and thanks for everything on this site. I've pretty much used all your guides and knowledge here to set up my business server (I installed VHCS2 to manage my virtual hosting) and it's been a tough ride and i've learned a lot.

    I will defintely be supporting your site with the €35 subscription or whatever it was, it's worth the donation.
  9. adam

    adam New Member

    actually, I do have another question concering the mail log.

    host[] said: 451 Invalid sender <[email protected]> (in reply to RCPT TO command)

    to=<[email protected]>,[], delay=282682, status=deferred (host[] said: 451 Invalid sender <[email protected]> (in reply to RCPT TO command))

    Are these errors with my server or problems with the destination?
  10. falko

    falko Super Moderator ISPConfig Developer

    The destination server is rejecting your mails because viking.local is no valid domain.
  11. adam

    adam New Member

    is it possible to remove these items because they just seem to bounce around the server or will they disappear in time?

    It's obviously not sending them now with the right domain name since fixing it (this was the result of a mailing list of ours)
  12. falko

    falko Super Moderator ISPConfig Developer

    Didn't you run
    postconf -e 'mydomain = $myhostname'
    ? Then viking.local shouldn't occur anymore in Did you restart Postfix?
  13. adam

    adam New Member

    yes i did do that but it seems like mail from before I made this change. I have constant logs now of emails that didnt reach the destination. i don't know how to remove them.
  14. falko

    falko Super Moderator ISPConfig Developer

    Then the mails seem to be in your mail queue. Have a look at
    man postqueue
    to learn how to delete specific emails. To delete all mails in the queue, run
    postsuper -d ALL
  15. adam

    adam New Member

    thanks again!

Share This Page