Re: ?how to generate sendmail.cf from sendmail.mx?

From: Paul Lutus (nospam_at_nosite.zzz)
Date: 10/05/04

  • Next message: Song Yun Zhao: "[Sydney] Red Hat Linux Meetup"
    Date: Mon, 04 Oct 2004 21:59:56 -0700
    
    

    Matt wrote:

    > Paul Lutus wrote:
    >
    >> You know, all this would be resolved in one exchange of posts, if you
    >> would only state the entire problem at once.
    >>
    >
    > Okay, well I will try to provide exactly the relevant information.
    >
    > I can now send and receive emails through my DSL line using Mozilla. I
    > want to also be able to send emails using the BSD mail program. I am
    > using an FC2 installation and basically haven't done anything other than
    > tell Mozilla the names of the ISP's incoming and outgoing mail servers.
    > Emails I send out using BSD mail get bounced back to me by my ISP's
    > outgoing server, with a message like:
    >
    > ----- The following addresses had permanent fatal errors -----
    > <myISPlogin@myISP.net>
    > (reason: 554 <root@myhost.localdomain>: Sender address rejected:
    > Domain not found. See http://postmaster.myISP.net)
    >
    > Looking at that url, it seems the above message is explained by:
    >
    >> # Improperly formatted or unknown envelope sender email addresses will be
    >> # blocked.
    >
    > BSD mail or something it calls is finding my Linux hostname and username
    > and constructing a return address (namely root@myhost.localdomain), but
    > it would seem the return address should be myISPlogin@myISP.net.

    There is the problem. When you post an e-mail through Mozilla, you enter
    your login name and account at your ISP, and the outgoing mail is routed
    through your ISP's mail service because you are logging into their mail
    server, not your own. IOW Mozilla is acting as a mail client, not a mail
    server.

    When you try to use BSD mail, everything is different. Your computer's
    sendmail service is accessed instead, which means there are limitations as
    to how you are identified and what domain name is used. Since your system
    has a defualt hostname, the domain part of the e-mail address is
    myhost.localdomain, while the user part is "root", which happens to be who
    you are logged on as. BTW that is a bad idea, log in as a normal user.

    But this certainly will not work as you seem to expect, because the local
    mail server will try to forward the mail to your ISP, which will reject it
    either as an unauthorized relay, or because there is no Internet domain
    "myhost.localdomain". Apparently the latter happened.

    > So it
    > looks like I have to edit a config file (maybe .mailrc?) somewhere to
    > cause BSD mail to use the correct return address, just as Mozilla uses
    > the correct return address.

    No, as a matter of fact, you may not be able to use BSD mail in this way.
    BSD mail is meant to handle local e-mail, it is not meant to be used as a
    client for your ISP's mail account, as Mozilla is.

    On the other hand, if your purpose is to automate the sending of e-mails
    from scripts and programs, you can always construct a text file with an
    appropriate header and send it using:

    $ cat messagefile.txt | sendmail -t

    The messagefile.txt should look more or less like this:

    *******************************************

    To:
    From:
    Reply-To:
    Subject:

    (message body)

    *******************************************

    If you have set up things reasonably well, sendmail will pick up any "from"
    and "to" fields you want to create, and forward the mail thorugh the
    system. But you will still have the problem of mails being rejected as
    unauthorized relays by your ISP.

    So this leads me to ask -- why are you doing this?

    -- 
    Paul Lutus
    http://www.arachnoid.com
    

  • Next message: Song Yun Zhao: "[Sydney] Red Hat Linux Meetup"

    Relevant Pages

    • Re: ?how to generate sendmail.cf from sendmail.mx?
      ... > I can now send and receive emails through my DSL line using Mozilla. ... > tell Mozilla the names of the ISP's incoming and outgoing mail servers. ... > Emails I send out using BSD mail get bounced back to me by my ISP's ... to configure sendmail to simply use your ISP's smtp server for outgoing ...
      (alt.os.linux.redhat)
    • Re: ?how to generate sendmail.cf from sendmail.mx?
      ... I can now send and receive emails through my DSL line using Mozilla. ... tell Mozilla the names of the ISP's incoming and outgoing mail servers. ... Emails I send out using BSD mail get bounced back to me by my ISP's ...
      (alt.os.linux.redhat)
    • Re: [SLE] SuSE + Spam Assassin for KDE
      ... > mozilla can't pick up local mail, so you might have to configure a pop ... > server for that. ... emails on any folder mozilla is using for input. ...
      (SuSE)
    • SUMMARY: question about sun mozilla?
      ... but i don't want to install GISWxprint and GISWxprintglue on my prod server. ... And it needs somme scripting if you want your users use firefox and thunderbird instead of mozilla, config files are not in .mozilla directory ... I gave up on running netscape/mozilla on the sunray server itself a long ... I agree that the memory foot print is ...
      (SunManagers)
    • Re: Should I Abandon Mutt and Exim4?
      ... I can send and receive email with Mozilla and receive ... > mail with fetchmail but I have not been able to setup exim4 to send ... > server name: mail.tomgeorge.info port 110 ...
      (Debian-User)