Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Sendmail on FreeBSD error

  • 29-11-2007 11:23AM
    #1
    Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭


    In work, I'm using a FreeBSD server to generate mails in a .local domain which go to a second server in the .local domain to be forwarded to my .com domain. I can send mails from the first server to any address except my .local domain. It just will not find the second server. DNS seems to be set up fine. MX record is being found but when I try to send a mail and run mailq, I get this:
    -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
    lASIs913024886        5 Wed Nov 28 18:54 <admin@test1.example.local>
                     (Deferred: Name server: test2.example.local.: host name lookup f)
                                             <test@test2.example.local>
    

    It seems to be a fairly common error but I can't find a fix for it. Anyone have any ideas?


Comments

  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    OK, I can email from the first server to any domain but the .local one. Exchange on the .com domain can email the .local domain. I'm completely stumped :confused:


  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    Make a copy of your sendmail.cf file

    Head into sendmail.mc

    Check this line

    DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

    Try putting a dnl at the start of that line.

    Quit sendmail.mc

    open the access db in the same folder

    Check that you have access setup for your local domain.

    Kick off the make command you find at the top of the sendmail.mc file, restart sendmail.

    Hope that helps. Make sure you back up your sendmail.cf and sendmail.mc files!


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    Thanks. The DAEMON_OPTIONS doesn't appear in the .mc file and access.db is set up. Still no luck though.


  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    Really?

    I've only used sendmail on rhel so there is probably a version miss match.


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    This is the bounced email I get back:
    From MAILER-DAEMON Thu Nov 29 16:30:38 2007
    Date: Thu, 29 Nov 2007 16:30:38 GMT
    From: Mail Delivery Subsystem <MAILER-DAEMON>
    To: <admin@test1.example.local>
    MIME-Version: 1.0
    Content-Type: multipart/report; report-type=delivery-status;
            boundary="lATGUc2n028798.1196353838/test1.example.local"
    Subject: Returned mail: see transcript for details
    Auto-Submitted: auto-generated (failure)
    
    This is a MIME-encapsulated message
    
    --lATGUc2n028798.1196353838/test1.example.local
    
    The original message was received at Thu, 29 Nov 2007 16:30:38 GMT
    from localhost.example.local [127.0.0.1]
    
       ----- The following addresses had permanent fatal errors -----
    <test12345@example.local>
    
       ----- Transcript of session follows -----
    550 5.1.2 <test12345@example.local>... Host unknown (Name server: example.local.: no data known)
    
    --lATGUc2n028798.1196353838/test1.example.local
    Content-Type: message/delivery-status
    
    Reporting-MTA: dns; test1.example.local
    Received-From-MTA: DNS; localhost.example.local
    Arrival-Date: Thu, 29 Nov 2007 16:30:38 GMT
    
    Final-Recipient: RFC822; test12345@example.local
    Action: failed
    Status: 5.1.2
    Remote-MTA: DNS; example.local
    Last-Attempt-Date: Thu, 29 Nov 2007 16:30:38 GMT
    
    --lATGUc2n028798.1196353838/test1.example.local
    Content-Type: message/rfc822
    
    Return-Path: <admin@test1.example.local>
    Received: from test1.example.local (localhost.example.local [127.0.0.1])
            by test1.example.local (8.13.8/8.13.8) with ESMTP id lATGUc2n028796
            for <test12345@example.local>; Thu, 29 Nov 2007 16:30:38 GMT
            (envelope-from admin@test1.example.local)
    Received: (from root@localhost)
            by test1.example.local (8.13.8/8.13.8/Submit) id lATGUcW9028795
            for test12345@example.local; Thu, 29 Nov 2007 16:30:38 GMT
            (envelope-from admin)
    Date: Thu, 29 Nov 2007 16:30:38 GMT
    From: User Admin <admin@test1.example.local>
    Message-Id: <200711291630.lATGUcW9028795@test1.example.local>
    To: test12345@example.local
    Subject: Test12345
    
    Test12345
    
    --lATGUc2n028798.1196353838/test1.example.local--
    

    This server can send to any other domain, just not example.local :confused::mad::(


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    No expert on sendmail now, but maybe its a problem with how your domain is setup.

    Can you dig example.local , would it be possible that .local is a character too long?


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    This is the output of dig example.local
    ; <<>> DiG 9.3.3 <<>> example.local
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57359
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;example.local.                    IN      A
    
    ;; AUTHORITY SECTION:
    example.local.             3600    IN      SOA     ad.example.com. hostmaster.example.com. 37 900 600 86400 3600
    
    ;; Query time: 4 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Thu Nov 29 16:47:36 2007
    ;; MSG SIZE  rcvd: 88
    

    I'm replacing the real domain name with example btw. The real name is shorter.


  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    How about mailing to test1@<theipaddress> ?


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    Exact same.


  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    What about these?
    dig @ad.example.com example.local
    dig @hostmaster.example.com example.local


  • Advertisement
  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    su-2.05b# dig @ad.example.com example.local
    
    ; <<>> DiG 9.3.3 <<>> @ad.example.com example.local
    ; (1 server found)
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18120
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;example.local.                    IN      A
    
    ;; AUTHORITY SECTION:
    example.local.             3600    IN      SOA     ad.example.com. hostmaster.example.com. 37 900 600 86400 3600
    
    ;; Query time: 0 msec
    ;; SERVER: 192.168.1.1#53(192.168.1.1)
    ;; WHEN: Thu Nov 29 17:09:53 2007
    ;; MSG SIZE  rcvd: 88
    
    su-2.05b# dig @hostmaster.example.com example.local
    dig: couldn't get address for 'hostmaster.example.com': not found
    

    Don't know what the craic is with hostmaster. Looks like it's something to do with DNS on Active Directory


  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    That is the cause of the error your Sendmail reported - it can't get the MX or A record for example.local so it can't determine which server receives mail for that domain:

    550 5.1.2 <test12345@example.local>... Host unknown (Name server: example.local.: no data known)

    SMART_HOST might be more suitable for your setup?
    http://www.google.com/search?q=sendmail+smarthost


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    No luck there unfortunately :/
    su-2.05b# mailq
                    /var/spool/mqueue (3 requests)
    -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
    lATIUc48029135     2391 Thu Nov 29 18:30 MAILER-DAEMON
                     (Deferred: Name server: test2.example.local.: host name lookup f)
                                             <supporttest@example.com>
    lATEXl9A028030        5 Thu Nov 29 14:33 <admin@test1.example.local>
                     (Deferred: Name server: test2.example.local.: host name lookup f)
                                             <fdsa@test2.example.local>
    lASIs913024886        5 Wed Nov 28 18:54 <admin@test1.example.local>
                     (Deferred: Name server: test2.example.local.: host name lookup f)
                                             <test@test2.example.local>
                    Total requests: 3
    su-2.05b# sendmail -q -v
    
    Running /var/spool/mqueue/lATIUc48029135 (sequence 1 of 3)
    <supporttest@example.com>... Connecting to test2.example.local. via esmtp...
    <supporttest@example.com>... Deferred: Name server: test2.example.local.: host name lookup failure
    
    Running /var/spool/mqueue/lATEXl9A028030 (sequence 2 of 3)
    <fdsa@test2.example.local>... Deferred: Name server: test2.example.local.: host name lookup failure
    
    Running /var/spool/mqueue/lASIs913024886 (sequence 3 of 3)
    <test@test2.example.local>... Deferred: Name server: test2.example.local.: host name lookup failure
    su-2.05b# nslookup test2.example.local
    Server:         192.168.1.1
    Address:        192.168.1.1#53
    
    Name:   test2.example.local
    Address: 192.168.1.11
    


  • Moderators, Music Moderators Posts: 23,363 Mod ✭✭✭✭feylya


    Something I've just realised - I can't telnet to 25 on test1 from test2. Dunno how much difference that'll make - I'm only using test1 to send emails, not receive


Advertisement