Professional Web Applications Themes

Mutt & sendmail configuration problems - FreeBSD

I'm trying to set up sendmail to route outgoing mail to an external SMTP server. I need this for Mutt, which doesn't have its own means of transfering mail and relies on whatever MTA the system provides. I found out about sendmail's SMARTHOST capability and added this line to my <host>.mc configuration file (built by 'cd /etc/mail && make && make install'): define(`SMART_HOST', `smtp.liu.se') I then installed the changes with 'make && make install && make restart'. Now, whenever I try to send mail from Mutt, I get back the following failure notice: Date: Sun, 20 Mar 2005 13:33:21 +0100 ...

  1. #1

    Default Mutt & sendmail configuration problems

    I'm trying to set up sendmail to route outgoing mail to an external SMTP server. I need this for Mutt, which doesn't have its own means of transfering mail and relies on whatever MTA the system provides. I found out about sendmail's SMARTHOST capability and added this line to my <host>.mc configuration file (built by 'cd /etc/mail && make && make install'):

    define(`SMART_HOST', `smtp.liu.se')

    I then installed the changes with 'make && make install && make restart'. Now, whenever I try to send mail from Mutt, I get back the following failure notice:


    Date: Sun, 20 Mar 2005 13:33:21 +0100 (CET)
    From: Mail Delivery Subsystem <MAILER-DAEMON>
    To: <ulfobygden>
    Subject: Returned mail: see transcript for details
    Auto-Submitted: auto-generated (failure)

    [-- Bilaga #1 --]
    [-- Typ: text/plain, Kodning: 7bit, Storlek: 0,5K --]

    The original message was received at Sun, 20 Mar 2005 13:33:20 +0100 (CET)
    from localhost [127.0.0.1]

    ----- The following addresses had permanent fatal errors -----
    <liu.se>
    (reason: 504 <ulfobygden>: Sender address rejected: need fully-qualified address)

    ----- Transcript of session follows -----
    .... while talking to smtp.liu.se.: [/ref][/ref]
    <<< 504 <ulfobygden>: Sender address rejected: need fully-qualified address
    554 5.0.0 Service unavailable
    <<< 554 Error: no valid recipients

    [-- Bilaga #2 --]
    [-- Typ: message/delivery-status, Kodning: 7bit, Storlek: 0,4K --]

    Reporting-MTA: dns; obygden
    Received-From-MTA: DNS; localhost
    Arrival-Date: Sun, 20 Mar 2005 13:33:20 +0100 (CET)

    Final-Recipient: RFC822; liu.se
    Action: failed
    Status: 5.5.4
    Remote-MTA: DNS; smtp.liu.se
    Diagnostic-Code: SMTP; 504 <ulfobygden>: Sender address rejected: need
    +fully-qualified address
    Last-Attempt-Date: Sun, 20 Mar 2005 13:33:21 +0100 (CET)

    [-- Bilaga #3 --]
    [-- Typ: message/rfc822, Kodning: 7bit, Storlek: 0,7K --]

    Date: Sun, 20 Mar 2005 13:33:20 +0100
    From: Ulf Magnusson <liu.se>
    To: liu.se
    Subject: test
    User-Agent: Mutt/1.4.2.1i

    test


    any ideas? Please be aware that I'm totally new to sendmail when replying :)

    Ulf Guest

  2. #2

    Default Re: Mutt & sendmail configuration problems

    On Sun, 20 Mar 2005, Ulf Magnusson wrote:
     

    Hi,

    the FEATURE has to be:

    define(`SMART_HOST', `[smtp.liu.se]')dnl

    Optional you can use the authinfo-file feature:

    FEATURE(`authinfo')dnl

    If so create a file /etc/mail/authinfo wiht something like this:

    AuthInfo:smtp.liu.se "U:yourusername" "P:yourpassword"

    Go to /etc/mail and run as root:
    makemap hash authinfo < authinfo
    chmod 600 authinfo authinfo.db

    Oliver

     [/ref]
    > <<< 504 <ulfobygden>: Sender address rejected: need fully-qualified address
    > 554 5.0.0 Service unavailable
    > <<< 554 Error: no valid recipients
    >
    > [-- Bilaga #2 --]
    > [-- Typ: message/delivery-status, Kodning: 7bit, Storlek: 0,4K --]
    >
    > Reporting-MTA: dns; obygden
    > Received-From-MTA: DNS; localhost
    > Arrival-Date: Sun, 20 Mar 2005 13:33:20 +0100 (CET)
    >
    > Final-Recipient: RFC822; liu.se
    > Action: failed
    > Status: 5.5.4
    > Remote-MTA: DNS; smtp.liu.se
    > Diagnostic-Code: SMTP; 504 <ulfobygden>: Sender address rejected: need
    > +fully-qualified address
    > Last-Attempt-Date: Sun, 20 Mar 2005 13:33:21 +0100 (CET)
    >
    > [-- Bilaga #3 --]
    > [-- Typ: message/rfc822, Kodning: 7bit, Storlek: 0,7K --]
    >
    > Date: Sun, 20 Mar 2005 13:33:20 +0100
    > From: Ulf Magnusson <liu.se>
    > To: liu.se
    > Subject: test
    > User-Agent: Mutt/1.4.2.1i
    >
    > test
    >
    >
    > any ideas? Please be aware that I'm totally new to sendmail when replying :)[/ref]

    --
    .... don't touch the bang bang fruit
    Oliver Guest

  3. #3

    Default Re: Re: Mutt & sendmail configuration problems

    I made the modifications suggested, but I still get the same error message. Note the following part:

    .... while talking to smtp.liu.se.: [/ref][/ref]
    <<< 504 <ulfobygden>: Sender address rejected: need fully-
    qualified address

    I'm guessing the problem is that "obygden" isn't a fully-qualified address, since it's only visible on the local network (that is, you can't do a DNS lookup on it from systems not connected to the network). What I don't know is how to find out what my fully-qualified address is, provided I have one (my understanding of DNS is still somewhat patchy). And, if I do know my fully-qualified hostname, how do I make sendmail use it instead of "obygden" when talking to the SMTP server?

    ----- Original Message -----
    From: Oliver Fuchs <de>
    Date: Sunday, March 20, 2005 5:47 pm
    Subject: Re: Mutt & sendmail configuration problems
     
    > external SMTP server. I need this for Mutt, which doesn't have its
    > own means of transfering mail and relies on whatever MTA the system
    > provides. I found out about sendmail's SMARTHOST capability and
    > added this line to my <host>.mc configuration file (built by 'cd
    > /etc/mail && make && make install'): 
    >
    > Hi,
    >
    > the FEATURE has to be:
    >
    > define(`SMART_HOST', `[smtp.liu.se]')dnl
    >
    > Optional you can use the authinfo-file feature:
    >
    > FEATURE(`authinfo')dnl
    >
    > If so create a file /etc/mail/authinfo wiht something like this:
    >
    > AuthInfo:smtp.liu.se "U:yourusername" "P:yourpassword"
    >
    > Go to /etc/mail and run as root:
    > makemap hash authinfo < authinfo
    > chmod 600 authinfo authinfo.db
    >
    > Oliver
    >

    > restart'. Now, whenever I try to send mail from Mutt, I get back
    > the following failure notice: 
    > +0100 (CET) 
    > fully-qualified address) 
    > > <<< 504 <ulfobygden>: Sender address rejected: need fully-[/ref]
    > qualified address 
    > rejected: need 
    > replying :)
    >
    > --
    > ... don't touch the bang bang fruit
    >[/ref]

    Ulf Guest

  4. #4

    Default Re: Mutt & sendmail configuration problems

    On 2005-03-20 14:21, Ulf Magnusson <liu.se> wrote: 

    E-mail messages send by your local Sendmail have an envelope-from
    address of <ulfobygden>. The remote MTA that receives the message
    knows nothing about the machine called ``obygden'' and rejects the
    message.

    One way to make this work is to use address-rewriting:

    1. Start by adding the following to your ``/etc/mail/obygden.mc'' file:

    FEATURE(masquerade_envelope)
    FEATURE(generics_entire_domain)
    FEATURE(genericstable, `hash -o /etc/mail/genericstable')
    GENERICS_DOMAIN(`localdomain.net')

    Where ``localdomain.net'' is the local domain of ``obygden''.

    2. Then in a file called ``genericstable'' in /etc/mail, put the
    following:

    ulfobygden liu.se
    localdomain.net liu.se

    3. Build a genericstable.db file and rebuild sendmail.cf:

    # cd /etc/mail
    # make
    # make install

    4. Restart Sendmail:

    # cd /etc/mail
    # make restart

    You should be set to go. Now the addresses the user ``ulf'' uses
    locally will be rewritten by Sendmail to real addresses on their way out
    and the receiving SMART_HOST/MTA will be happy to forward the messages
    to their destination.

    - Giorgos

    Giorgos Guest

  5. #5

    Default Re: Mutt & sendmail configuration problems

    I switched to Postfix, and after a little twiddling everything works
    fine. I'll just stick with PF until I need some sendmail-specific feature.
    Anyway, thanks for your help!

    On Mon, Mar 21, 2005 at 12:43:19PM +0200, Giorgos Keramidas wrote: 
    >
    > E-mail messages send by your local Sendmail have an envelope-from
    > address of <ulfobygden>. The remote MTA that receives the message
    > knows nothing about the machine called ``obygden'' and rejects the
    > message.
    >
    > One way to make this work is to use address-rewriting:
    >
    > 1. Start by adding the following to your ``/etc/mail/obygden.mc'' file:
    >
    > FEATURE(masquerade_envelope)
    > FEATURE(generics_entire_domain)
    > FEATURE(genericstable, `hash -o /etc/mail/genericstable')
    > GENERICS_DOMAIN(`localdomain.net')
    >
    > Where ``localdomain.net'' is the local domain of ``obygden''.
    >
    > 2. Then in a file called ``genericstable'' in /etc/mail, put the
    > following:
    >
    > ulfobygden liu.se
    > localdomain.net liu.se
    >
    > 3. Build a genericstable.db file and rebuild sendmail.cf:
    >
    > # cd /etc/mail
    > # make
    > # make install
    >
    > 4. Restart Sendmail:
    >
    > # cd /etc/mail
    > # make restart
    >
    > You should be set to go. Now the addresses the user ``ulf'' uses
    > locally will be rewritten by Sendmail to real addresses on their way out
    > and the receiving SMART_HOST/MTA will be happy to forward the messages
    > to their destination.
    >
    > - Giorgos
    >[/ref]
    Ulf Guest

  6. #6

    Default Re: Mutt & sendmail configuration problems

    On 2005-03-22 11:16, Ulf Magnusson <com> wrote: 
    >>
    >> [ Description of FEATURE(`genericstable') ][/ref]
    >
    > I switched to Postfix, and after a little twiddling everything works
    > fine. I'll just stick with PF until I need some sendmail-specific
    > feature. Anyway, thanks for your help![/ref]

    It's ok. As long as you can do what you want, it shouldn't really matter
    if you are using Sendmail, Postfix, Exim or whatever.

    One good thing about your question has reminded me of a comment a close
    friend has made several times: that the Handbook instructions about
    SMART_HOST are fine, as long as one uses the -f option of Sendmail in their
    ..muttrc or a similar way to set the envelope-from address. But most people
    don't know what the difference is between envelope-from and the header-from
    address that their mailer sets.

    I should really update the Handbook one of these days. This particular
    item has been sitting in my TODO list for months now, waiting a bit of
    available time :-)

    Since a lot of people may read this thread in the archives of the list and
    have similar questions about Sendmail or Postfix, can you post a reply with
    a small description of the procedure needed to configure Postfix to do
    something similar? That would be nice to have in the list archives.

    Regards,

    Giorgos

    Giorgos Guest

Similar Threads

  1. Sendmail masquerading configuration
    By Ian Moore in forum FreeBSD
    Replies: 3
    Last Post: February 23rd, 11:32 AM
  2. PHP Configuration Problems
    By Mark in forum PHP Development
    Replies: 7
    Last Post: November 20th, 09:36 AM
  3. Sendmail problems
    By mikeyw in forum Sun Solaris
    Replies: 2
    Last Post: September 19th, 09:32 AM
  4. sendmail/fetchmail/procmail/mutt from source
    By Nico Kadel-Garcia in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: June 26th, 03:11 PM
  5. Sendmail configuration
    By Dan Phiffer in forum Sun Solaris
    Replies: 2
    Last Post: June 26th, 02:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139