SOHO mail setup revisited - BSD

This is a discussion on SOHO mail setup revisited - BSD ; Hi folks, This is not directly an OpenBSD question, but a) the server is OpenBSD and b) you're all wonderful. No, really. My home office mail setup has been stable for some years: - outgoing mail: no problem - incoming ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: SOHO mail setup revisited

  1. SOHO mail setup revisited

    Hi folks,

    This is not directly an OpenBSD question, but a) the server is OpenBSD
    and b) you're all wonderful. No, really.

    My home office mail setup has been stable for some years:
    - outgoing mail: no problem
    - incoming mail: redirected by my (coloco'ed) domain server to a
    mailbox provided by an ISP, then downloaded by my home server with
    fetchmail, and distributed to local users by sendmail.

    It's the fetchmail bit I'm less happy about nowadays - I've had to turn
    off the DNS lookup (what's the point in not downloading mail in my
    mailbox even if the sender's domain doesn't check out?), and I'm wary of
    the new envelope warnings (I'm effectively using an external mailbox in
    multidrop mode, which seems to be rather taboo). Finally I'm not sure
    that fetchmail is still the best way to do this.

    It seems important to me to use an external mailbox (or mailboxes),
    since my home server may or may not be on and/or connected; and my
    domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    should bite the bullet and point my MX records at my home server, and
    open up the ports etc etc...

    But is there a better way? What's "best practice" on this these days?
    ETRN?

    All cluesticks gratefully received,

    Steve
    http://www.fivetrees.com



  2. Re: SOHO mail setup revisited

    "Steve at fivetrees" wrote in message
    news:WLOdnf7t_L59fjXbRVnyhQA@pipex.net...
    >
    > It seems important to me to use an external mailbox (or mailboxes),
    > since my home server may or may not be on and/or connected; and my
    > domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    > should bite the bullet and point my MX records at my home server, and
    > open up the ports etc etc...
    >
    > But is there a better way? What's "best practice" on this these days?
    > ETRN?


    Afterthought: it would be *great* if I could deliver incoming mail to
    Maildir (Dovecot) inboxes too...

    Steve
    http://www.fivetrees.com



  3. Re: SOHO mail setup revisited

    On 2007-07-26, Steve at fivetrees wrote:
    >
    > It seems important to me to use an external mailbox (or mailboxes),
    > since my home server may or may not be on and/or connected; and my
    > domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    > should bite the bullet and point my MX records at my home server, and
    > open up the ports etc etc...
    >
    > But is there a better way? What's "best practice" on this these days?
    > ETRN?
    >


    While the answer is not OpenBSD either ... I've looked into services
    via http://www.tuffmail.com in the past when considering outsourcing
    my incoming mail services. The prices seemed reasonable and the
    antispam features seemed plentiful.

    That said, it was over a year ago that I looked at tuffmail. I currently
    use a webhosting provider that currently gives me a lot of control over
    sendmail so I haven't actually used the tuffmail services.

    --
    ratfood@food.skaterat.net
    All foods should be removed to reply

  4. Re: SOHO mail setup revisited

    "John McGrail" wrote in message
    news:slrnfahur2.t68.ratfood@spearmint.skaterat.net ...
    > On 2007-07-26, Steve at fivetrees wrote:
    >>
    >> It seems important to me to use an external mailbox (or mailboxes),
    >> since my home server may or may not be on and/or connected; and my
    >> domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    >> should bite the bullet and point my MX records at my home server, and
    >> open up the ports etc etc...
    >>
    >> But is there a better way? What's "best practice" on this these days?
    >> ETRN?
    >>

    >
    > While the answer is not OpenBSD either ... I've looked into services
    > via http://www.tuffmail.com in the past when considering outsourcing
    > my incoming mail services. The prices seemed reasonable and the
    > antispam features seemed plentiful.
    >
    > That said, it was over a year ago that I looked at tuffmail. I
    > currently
    > use a webhosting provider that currently gives me a lot of control
    > over
    > sendmail so I haven't actually used the tuffmail services.


    Well, it happens that my domain/hosting servers are fivetrees.com -
    which I own . So I also have good control over sendmail there.
    (Currently at fivetrees, we don't provide mailboxes - we simply forward
    to named ISP mailboxes. I could adapt/change this if necessary.)

    Steve
    http://www.fivetrees.com



  5. Re: SOHO mail setup revisited

    "Steve at fivetrees" wrote in message
    news:iP2dnYkExOrgeTXbnZ2dnUVZ8rOdnZ2d@pipex.net...
    > "Steve at fivetrees" wrote in message
    > news:WLOdnf7t_L59fjXbRVnyhQA@pipex.net...
    >>
    >> It seems important to me to use an external mailbox (or mailboxes),
    >> since my home server may or may not be on and/or connected; and my
    >> domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    >> should bite the bullet and point my MX records at my home server, and
    >> open up the ports etc etc...
    >>
    >> But is there a better way? What's "best practice" on this these days?
    >> ETRN?

    >
    > Afterthought: it would be *great* if I could deliver incoming mail to
    > Maildir (Dovecot) inboxes too...


    To answer my own post (for the archives), the getmail package is looking
    very promising. It's intended as a replacement for fetchmail, and
    delivers to maildirs very nicely. And deals with multidrop mailboxes
    explicitly.

    I was puzzled for a while by getmail delivering directly to maildirs -
    that's all very well for mail downloaded from an external mailbox, but
    what about mail sent to/from local users by sendmail? It finally dawned
    on me that I could use getmail to fix that too - by "downloading" from
    the local server using pop3 and thus delivering to the maildir.

    (Unless of course there's a "better" way, and I'm missing something,
    which is not just possible but likely...)

    Steve
    http://www.fivetrees.com



  6. Re: SOHO mail setup revisited

    Steve at fivetrees wrote:
    > "Steve at fivetrees" wrote in message
    > news:iP2dnYkExOrgeTXbnZ2dnUVZ8rOdnZ2d@pipex.net...
    >> "Steve at fivetrees" wrote in message
    >> news:WLOdnf7t_L59fjXbRVnyhQA@pipex.net...
    >>>
    >>> It seems important to me to use an external mailbox (or mailboxes),
    >>> since my home server may or may not be on and/or connected; and my
    >>> domain server (also OpenBSD) does all the spamtrapping etc. Perhaps I
    >>> should bite the bullet and point my MX records at my home server, and
    >>> open up the ports etc etc...
    >>>
    >>> But is there a better way? What's "best practice" on this these days?
    >>> ETRN?

    >>
    >> Afterthought: it would be *great* if I could deliver incoming mail to
    >> Maildir (Dovecot) inboxes too...

    >
    > To answer my own post (for the archives), the getmail package is looking
    > very promising. It's intended as a replacement for fetchmail, and
    > delivers to maildirs very nicely. And deals with multidrop mailboxes
    > explicitly.
    >
    > I was puzzled for a while by getmail delivering directly to maildirs -
    > that's all very well for mail downloaded from an external mailbox, but
    > what about mail sent to/from local users by sendmail? It finally dawned
    > on me that I could use getmail to fix that too - by "downloading" from
    > the local server using pop3 and thus delivering to the maildir.


    I've been doing this for a while and it works great.
    Since SMTP support is not yet present in mutt, I send replies by
    doing an 'r', composing the message, and then sending it with a
    ':%!msmtp -t' command, after which I do a ':q!' to exit back to mutt.

    > (Unless of course there's a "better" way, and I'm missing something,
    > which is not just possible but likely...)
    >
    > Steve
    > http://www.fivetrees.com
    >
    >


    --
    Be Happy. Don't Worry about the difference between lose and loose.

  7. Re: SOHO mail setup revisited

    Steve at fivetrees wrote:

    > "Steve at fivetrees" wrote in message
    > news:iP2dnYkExOrgeTXbnZ2dnUVZ8rOdnZ2d@pipex.net...


    > >
    > > Afterthought: it would be *great* if I could deliver incoming mail to
    > > Maildir (Dovecot) inboxes too...

    >
    > To answer my own post (for the archives), the getmail package is looking
    > very promising. It's intended as a replacement for fetchmail, and
    > delivers to maildirs very nicely. And deals with multidrop mailboxes
    > explicitly.
    >
    > I was puzzled for a while by getmail delivering directly to maildirs -
    > that's all very well for mail downloaded from an external mailbox, but
    > what about mail sent to/from local users by sendmail? It finally dawned
    > on me that I could use getmail to fix that too - by "downloading" from
    > the local server using pop3 and thus delivering to the maildir.
    >
    > (Unless of course there's a "better" way, and I'm missing something,
    > which is not just possible but likely...)
    >


    You start with the wrong assumption that sendmail does local delivery of
    email. sendmail doesn't. In OpenBSD, /usr/libexec/mail.local does. And
    you are right, mail.local does not deliver to Maildir, only mbox.

    After installing Dovecot, you should have modified sendmail to use a
    local delivery agent that works better with Dovecot (Dovecot's own LDA
    "deliver" for exemple.)

    I don't use fetchmail in a multidrop setup, but I do by pass sendmail by
    delivering via procmail directly. I use the mda option for that.

    I don't know how getmail gets to bypass sendmail. It might work because
    all the Maildir directories are owned by the same user you run getmail
    as.

  8. Re: SOHO mail setup revisited

    dave wrote:

    >
    > I've been doing this for a while and it works great.
    > Since SMTP support is not yet present in mutt, I send replies by
    > doing an 'r', composing the message, and then sending it with a
    > ':%!msmtp -t' command, after which I do a ':q!' to exit back to mutt.


    Mutt is very configurable. The msmtp package even have documentation to
    let Mutt use msmtp directly:

    http://msmtp.sourceforge.net/doc/msm...smtp-with-Mutt

    Those are "vi" commands, many set their VISUAL/EDITOR command to
    something they like better and Mutt will use that.


  9. Re: SOHO mail setup revisited


    "Hugo Villeneuve" wrote in message
    news:1i216tc.1liyzohfxs85cN%hugo@EINTR.net...
    > Steve at fivetrees wrote:
    >
    >> "Steve at fivetrees" wrote in message
    >> news:iP2dnYkExOrgeTXbnZ2dnUVZ8rOdnZ2d@pipex.net...
    >> >
    >> > Afterthought: it would be *great* if I could deliver incoming mail
    >> > to
    >> > Maildir (Dovecot) inboxes too...

    >>
    >> To answer my own post (for the archives), the getmail package is
    >> looking
    >> very promising. It's intended as a replacement for fetchmail, and
    >> delivers to maildirs very nicely. And deals with multidrop mailboxes
    >> explicitly.
    >>
    >> I was puzzled for a while by getmail delivering directly to
    >> maildirs -
    >> that's all very well for mail downloaded from an external mailbox,
    >> but
    >> what about mail sent to/from local users by sendmail? It finally
    >> dawned
    >> on me that I could use getmail to fix that too - by "downloading"
    >> from
    >> the local server using pop3 and thus delivering to the maildir.
    >>
    >> (Unless of course there's a "better" way, and I'm missing something,
    >> which is not just possible but likely...)

    >
    > You start with the wrong assumption that sendmail does local delivery
    > of
    > email. sendmail doesn't. In OpenBSD, /usr/libexec/mail.local does. And
    > you are right, mail.local does not deliver to Maildir, only mbox.


    Oh! You're right, I didn't know.

    > After installing Dovecot, you should have modified sendmail to use a
    > local delivery agent that works better with Dovecot (Dovecot's own LDA
    > "deliver" for exemple.)


    Er, no - didn't see that in the docs. Any pointers?

    > I don't use fetchmail in a multidrop setup, but I do by pass sendmail
    > by
    > delivering via procmail directly. I use the mda option for that.
    >
    > I don't know how getmail gets to bypass sendmail. It might work
    > because
    > all the Maildir directories are owned by the same user you run getmail
    > as.


    On my current setup, it doesn't bypass sendmail as such - I was thinking
    of using getmail to move incoming mail from /var/mail to ~/Maildir. My
    only slight reservation about this is that it would have to be a
    frequent cron job for each user... unless I'm missing something - again
    .

    Thanks for your input.

    Steve
    http://www.fivetrees.com



  10. Re: SOHO mail setup revisited

    Hi,

    I originally tried to post this from ISP news server but it is being
    unreliable, so
    apologies if it turns up multiple times.

    > On my current setup, it doesn't bypass sendmail as such - I was thinking
    > of using getmail to move incoming mail from /var/mail to ~/Maildir. My
    > only slight reservation about this is that it would have to be a
    > frequent cron job for each user... unless I'm missing something - again
    > .


    Ugh, no. You really have two choices as I see it (and I get a chance
    to
    plug fdm ;-):

    - Use getmail, fetchmail+procmail/maildrop, or fdm to grab the mail
    with
    POP3 and put it directly in maildirs. This takes sendmail entirely out
    of
    the equation for remote mail. I might avoid fdm for this purpose; I
    don't
    currently have a multidrop mailbox so fdm's support for them is
    somewhat
    creative and untested, unless you fancy being a tester ;-). Although
    to my
    knowledge the others don't privsep so you get to run a lot of
    fetchmail or
    Python mail handling code as root.

    For local mail, you will also need to tweak sendmail to run an MDA
    that can
    deliver to maildirs (procmail, maildrop, fdm or whatever). AFAIK this
    isn't
    terribly hard.

    - Use fetchmail, fdm, getmail or whatever to grab the mail and deliver
    directly to sendmail (either by TCP or using a pipe, former probably
    better
    depending on your volume of mail) (this is what fetchmail does by
    default)
    and just change sendmail to invoke a different MDA. This has the
    advantage
    that nothing except sendmail must run as root (although I think you
    will
    need to explicitly configure/force fetchmail and getmail not to), also
    that
    all mail is treated the same, local and remote.

    Hope this is useful,

    -- Nicholas.


  11. Re: SOHO mail setup revisited

    wrote in message
    news:1185783265.859129.87220@b79g2000hse.googlegro ups.com...
    >
    > Ugh, no. You really have two choices as I see it (and I get a chance
    > to
    > plug fdm ;-):
    >
    > - Use getmail, fetchmail+procmail/maildrop, or fdm to grab the mail
    > with
    > POP3 and put it directly in maildirs. This takes sendmail entirely out
    > of
    > the equation for remote mail. I might avoid fdm for this purpose; I
    > don't
    > currently have a multidrop mailbox so fdm's support for them is
    > somewhat
    > creative and untested, unless you fancy being a tester ;-). Although
    > to my
    > knowledge the others don't privsep so you get to run a lot of
    > fetchmail or
    > Python mail handling code as root.
    >
    > For local mail, you will also need to tweak sendmail to run an MDA
    > that can
    > deliver to maildirs (procmail, maildrop, fdm or whatever). AFAIK this
    > isn't
    > terribly hard.
    >
    > - Use fetchmail, fdm, getmail or whatever to grab the mail and deliver
    > directly to sendmail (either by TCP or using a pipe, former probably
    > better
    > depending on your volume of mail) (this is what fetchmail does by
    > default)
    > and just change sendmail to invoke a different MDA. This has the
    > advantage
    > that nothing except sendmail must run as root (although I think you
    > will
    > need to explicitly configure/force fetchmail and getmail not to), also
    > that
    > all mail is treated the same, local and remote.
    >
    > Hope this is useful,


    Indeed it is - thanks for taking the time. I'll look into fdm.

    Steve
    http://www.fivetrees.com



+ Reply to Thread