Virtual Users and Domains with Postfixx...Ubuntu (8.04LTS)

Discussion in 'HOWTO-Related Questions' started by philefluxx, Oct 16, 2009.

  1. philefluxx

    philefluxx New Member

    Hi,
    I am a bit new to Linux, but this guide is fairly simple to follow (thanks Falko!) but Ive ran into a bit of a snag.

    So far the only issue I ran into during installation/setup is that mysql says its only listening to localhost and not localhost.localdo like the guide says it should when doing netstat -tap | grep mysql

    So I went ahead and continued through the rest of the guide without a hitch! But when I attempt to send a message using mailx to a test account I receive this error in the mail.log (Ive renamed some things for security):

    MailServer1 is my host name
    my.domain.net is my virtual domain

    ct 15 18:22:17 MailServer1 dccproc[29931]: no working DCC servers dcc1.dcc-servers.net dcc2.dcc-servers.net dcc3.dcc-servers.net ... at 208.201.249.233 209.169.14
    Oct 15 18:22:17 MailServer1 postfix/smtpd[29933]: connect from localhost[127.0.0.1]
    Oct 15 18:22:17 MailServer1 postfix/smtpd[29933]: 91EA53656285: client=localhost[127.0.0.1]
    Oct 15 18:22:17 MailServer1 postfix/cleanup[29924]: 91EA53656285: message-id=<[email protected]>
    Oct 15 18:22:17 MailServer1 postfix/qmgr[29446]: 91EA53656285: from=<[email protected]>, size=866, nrcpt=1 (queue active)
    Oct 15 18:22:17 MailServer1 postfix/smtpd[29933]: disconnect from localhost[127.0.0.1]
    Oct 15 18:22:17 MailServer1 amavis[16961]: (16961-05) Passed CLEAN, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: zfiuUIen9whI, Hits: 1.55, size: 354, queued_as: 91EA53656285, 5898 ms
    Oct 15 18:22:17 MailServer1 postfix/smtp[29927]: A9D6C3656286: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=6, delays=0.05/0/0/5.9, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 91EA53656285)
    Oct 15 18:22:17 MailServer1 postfix/qmgr[29446]: A9D6C3656286: removed
    Oct 15 18:22:17 MailServer1 postfix/smtp[29936]: 91EA53656285: to=<[email protected]>, relay=none, delay=0.03, delays=0.02/0.01/0/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=mail.my.domain.net type=A: Host not found)

    At first glance I thought "Oh! It cannot find my domain, lets hard set our hosts file to say my.domain.net points to 127.0.0.1, but that didnt work.


    What is strange is that if I set up a forward in my forwards table and send a message to the origin address it does forward to my destination address so it would appear postfix is talking to the mysql database. Also if i set up a cc in a message using mailx I will receive it on the ccd address so it appears transport is working. I just cant seem to get the mail back into the box to create the maildir.

    So lastly I attempted to send a message from my exchange server and pointed the message to test@MailServer1's address. I receive a bounce back saying the address is in a invalid format but when I check mail logs on the mail server I see:



    Oct 15 18:43:18 officemail1 postfix/smtpd[29973]: connect from exchange.other.domain.net[192.168.*.**]
    Oct 15 18:43:18 MailServer1 postfix/smtpd[29973]: warning: Illegal address syntax from exchange.other.domain.net[192.168.1.13] in RCPT command: <[email protected].*.**>
    Oct 15 18:43:18 MailServer1 postfix/smtpd[29973]: disconnect from exchange.other.domain.net[192.168.*.**]


    Ive added the subnet that the exchange server resides on into mynetworks in the main.cf of postfix, yet I still receive this error.

    Any ideas on what may be wrong? Does this have anything to do with mysql only listening for localhost and not localhost.localdo?

    If there is anything else I need to provide just ask and thank you in advance for any help you can provide.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Have you tried to add mail.my.domain.net to /etc/hosts?
    But it would be better to create an A record for it.
     
  3. philefluxx

    philefluxx New Member

    Yes I have, with the same result. The mail log that I posted has both the my.domain.net added to the hosts file as well as mail.my.domain.net



    I think its rather strange that with specified entries in the hosts file, the server still does not know where to find the domain.


    edit: and I have also restarted Postfix, Courier, MySql after making the changes to the hosts file.
     
    Last edited: Oct 16, 2009
  4. philefluxx

    philefluxx New Member

    I also wanted to add that I can ping my.domain.net as well as mail.my.domain.net and it resolves to local host. Very strange...
     
  5. philefluxx

    philefluxx New Member

    RESOLVED:


    Most of my system experience is with MS. Being newer to Linux I didnt realize just how different they handle "domain" name conventions. I ended up burning the box down and starting from scratch and this time I didnt use a subdomain and my mail is coming in just fine and populating my maildir. Now I can do this again with a proper domain convention and I know exactly where I botched the first attempt. Thanks again for the most excellent guide Falko!:cool:
     

Share This Page