Re: [SLE] Seeking help with mail-server setup

From: Sandy Drobic (suse-linux-e_at_japantest.homelinux.com)
Date: 08/29/05

  • Next message: Greg Freemyer: "Re: [SLE] Is there any way to install SuSE from HDD?"
    Date: Mon, 29 Aug 2005 18:32:56 +0200
    To: suse-linux-e@suse.com
    
    

    mlist@safenet-inc.com wrote:

    > So, if I'm understanding this, fetchmail grabs from ISP POP and drops
    > at some standard place (or a configured place?), postfix grabs what
    > fetchmail brought and feeds it to IMAP (Cyrus in this case), CyrusIMAP
    > sits on it, fielding read and write and folder-filing requests that
    > come from my laptop that's using some mailreader program, CyrusIMAP
    > places any messages that my mailreader wants to send in a place where
    > postfix can see it... but not the same place that fetchmail put the
    > POP'ed mail... and postfix feeds those sent messages to the ISP's SMTP
    > server? Or is there another program at the end to do the talking to the
    > SMTP server?

    Incoming:
    Yes, fetchmail grabs the mails from the mailaccounts of your provider and
    feeds them to postfix.
    Postfix uses his configuration to see, if the mails belong to a local
    account or a remote account. It's your task to see to it, that postfix
    knows the mails you are polling with fetchmail are indeed local accounts.
    Then postfix delivers the mails to Cyrus.
    Cyrus stores the mail in a mailbox or more probably in a maildir.
    Cyrus also offers access to the stored mails using POP3 or IMAP (prefered).

    Second way to receive mails would be to have a permanent connection to the
    internet and open port 25 of your server directly to the internet. Be
    aware that if you do this you MUST have a secure configuration, else your
    server will be abused as a relay by spammers faster than you think possible.
    In that case postfix accepts mails directly and forwards them to cyrus.

    Outgoing:
    Your mailclient asks postfix to relay the mail.
    Postfix can either try to deliver the mail directly to the mailserver that
      is responsible for the email address you are sending your mail or, if
    you don't have a fixed ip address, delivers all outgoing mails to the
    mailserver of your provider.

    > So postfix is grabbing from both directions and placing/pushing in both
    > directions? I didn't quite follow that when I invoked YaST "Network
    > Services > Mail Transfer Agent".

    That's right, postfix doesn't store mails, it only acts as a router for
    mails. I think you could bypass postfix

    >>> By the way, I don't have static IP from my ISP (I can get
    >>
    >> for an extra ten
    >>
    >>> or twenty bucks per month if that will make a difference.)
    >>
    >> If you intend to use fetchmail, it doesn't matter.
    >
    >
    > Ok. I didn't see where it would matter, in either direction, since
    > actions are always being initiated from my location, not from out in
    > the world, but while I was googling on this general topic, I
    > encountered more than one mail thread in which somebody asked the
    > inquirer if he had static or dynamic IP... as though it mattered in
    > context. That's the trouble when starting something new. Every bit of
    > info seems as important or relevant as every other. We can only filter
    > out the words of people who don't really know or words that apply to a
    > different context... after we've figured out the topic and become
    > confident and competent in it.

    The root of the problem is, that most spam today is sent by so-called
    "zombies". PCs that have been infected by spamware, viruses etc. and are
    used to relay spam mails. The usually have dynamic ip addresses.

    That is the reason why many big ISPs summarily block mails from dynamic ip
    addresses.

    > Inbound... I thought SMTP was what the ISP used to send _outbound_ mail
    > to the internet. It was this switching of the meaning of
    > "inbound/incoming" and "outbound/outgoing" that really helped confuse
    > me.

    If you open port 25 of your postfix server to the internet you are a
    mailserver.

    > Ok... if I think about that... SMTP _inbound_ on my server would be...
    > where? Where mail comes from my clients on its way to the ISP? Nah.
    > Not with IMAP. The mail doesn't live on the client - it lives on the
    > IMAP server. Oh wait... does the IMAP server have to use a port to get
    > mail to postfix that is intended to go out to the internet? Or does it
    > just drop its "outbound" messages in a directory that postfix watches
    > and recognizes as "give this to the ISP"??

    Cyrus is not used to send mails. Cyrus is only used to store, access and
    manage mails delivered to a cyrus account.

    > Or did I have that all wrong and every POP server must talk to an SMTP
    > server? Then fetchmail has the inbound SMTP port to get the messages
    > from the ISP's POP server? A lot of this is going to make sense when
    > it becomes clear what people mean by "inbound/incoming" and
    > "outbound/outgoing" in every context. So far... not.

    You've got some wild ideas that are not very close to reality. (^-^)
    Fetchmail doesn't need an open port. An open port is only needed for a
    server program that listens to requests on the network.
    Fetchmail on the other hand is called periodically and actively "fetches"
    the mails. Thus it doesn't need an open port to listen to requests.

    POP or IMAP on the other hand listen to requests from your mail client to
    connect to your server so you can access your mails.

    > No two seem to say the same (unless one is a rip-off of another). I
    > have read a few... don't know if they were the good ones, which is how
    > I got confused about what gets used when and where? For example, the
    > bit above where postfix has created all those nice directories and then
    > both postfix and I should ignore them?

    These directories are used by postfix to store mails that are transfered.
    if you wouldn't use Cyrus, postfix would store the mails in
    /var/spool/mail/{username}, where {username} is the name of the local
    account. Since you are using Cyrus, that program is now responsible for
    receiving and storing mails. Usually Cyrus stores them in
    /var/spool/imap/username.

    > Is there a Howto with pictures and circles and arrows?
    >
    > If I had a working example in front of me to pick at, this would
    > probably make sense, but I have to "get it" first before I can have a
    > working example.

    Very unlikely. (^-^) Yast goes to great length to hide the amount of
    necessary configuration but there are simply limits how much can be
    preconfigured with yast.

    > My new setup might already be perfectly functional, and I just haven't
    > found the "on" switch. :-) I might be leaning on the "on" switch and
    > not even recognize it.

    I suggest you do it step-by-step, so you can verify each single step is
    working, try to understand what the program is doing and only proceed when
    you know that the step is working.

    In your case, I would stop fetchmail and first set up the system until it
    is working. In the meantime use your normal email program.
    So, try to get postfix running as it should. Then you can tell your
    mailclient to use your local postfix as outgoing mailserver.

    Then set up Cyrus, create the necessary mailaccounts (yes, you need to set
    them up using cyradm!) and verify that you can access the accounts in
    Cyrus. Verify that postfix then delivers mails to Cyrus for storage.

    Only then would I activate fetchmail again to poll the mailaccounts from
    your ISP.

    DON'T TRY TO UNDERSTAND ANYTHING AT ONCE! This will only give you
    headaches. Step-by-step is the way to go...Rome wasn't build in one day,
    either.

    By the way, the setup you are trying to use can very well be used by a
    full-blown ISP, if you expand it with the necessary databases for
    administration and the corresponding hardware. So don't feel to bad if you
    don't succeed in setting up this environment in one or two days.

    Sandy

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Greg Freemyer: "Re: [SLE] Is there any way to install SuSE from HDD?"

    Relevant Pages

    • RE: [SLE] POP Mail HOWTO?
      ... delivered locally to an IMAP server (cyrus) ... Packages needed: postfix, cyrus-imapd, fetchmail, ... Postfix and Procmail and... ... But those config options were so ...
      (SuSE)
    • Re: [opensuse] Postfix + Cyrus IMAP + MySQL wont work :-(
      ... Did you have a previous installation with Sendmail enabled? ... The sendmail binary from Postfix logs its entries like ... Are you able to use deliver to submit mails to Cyrus? ...
      (SuSE)
    • Re: [SLE] Re: IMAP server - upgrading to SuSE 9.2
      ... > The Imap service doesn't have anything to do with fetchmail. ... > them in the mail queue for postfix to pick them up. ... > Postfix delivers these mails to the local mailboxes or relays them to ...
      (SuSE)
    • Re: [SLE] Re: IMAP server - upgrading to SuSE 9.2
      ... >>Can fetchmail be used with Courier or Cyrus IMAP? ... Fetchmail "fetches" your mails from the various pop servers and dumps them ... in the mail queue for postfix to pick them up. ...
      (SuSE)
    • Weiterleitung via Postfix
      ... Ein Mailserver (basierend auf SuSE Linux 9.3 und Postfix als Mailserver) ... Server weiterleiten. ... Das Überprüfen der Adressen und das Weiterleiten der Mails würde ... Leider funktionert es im Zusammenhang mit Fetchmail nicht, ...
      (de.comp.os.unix.linux.misc)