RE: [SLE] Seeking help with mail-server setup
Per Jessen [mailto:per@computer.org] replied to my confused wonderings:
So, I thought I'd set fetchmail to get my mail from the ISP onto the tower, then use CyrusIMAP to serve my mailreader on the laptop. I understand that postfix has to be www.allwww.allo.cho.chin there somewhere (at least for the outgoing mail being sent to the ISP's SMTP server, and probably for some other
mlist@safenet-inc.com wrote: part of handling
- not clear on that.
Yep, you'll need postfix (or exim or sendmail) for inbound and outbound mail.
Um. But do the terms "inbound" and "outbound" refer only to the directions "to-and-from the ISP"? 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? 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".
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.
At 16:03 yesterday, two messages from another mailing list were grabbed and put into /var/spool/mail (also /var/mail) in a file called "elefino" (my ID on that computer... I'm writing from my work account "mlist" at this moment). That's the only mail I've seen that fetchmail might have handled. The fetchmail log says that it has retrieved several more messages in the hours since four o'clock yesterday afternoon, but I don't know where they are going.
Did you instruct fetchmail to deliver mails to postfix?
I "instructed" whatever YaST "Network Services > Mail Transfer Agent" instructed. It mostly doesn't actually SAY what programs it is talking about, just refers to "Incoming" or "Outgoing" or server or host in ways that leave me perplexed about which leg of the operation is being config'd.
I looked in /var/spool/postfix, and it has a nice structure of directories including active, bounce, corrupt, defer, deferred, flush, hold, incoming, maildrop... Half of them were created/modified in March (when this version of SuSE was released) and the rest were created yesterday. They all appear empty. I have to view them as root, because of the permissions.
You can ignore those. Any mail should turn up in /var/mail/ .
Eek! So... if postfix is so important to the whole process -- you seem to have said it takes inbound from fetchmail and outbound from CyrusIMAP -- then it doesn't even use its own nifty directory structure? Yup, this stuff is simple and straightforward all right. <g>
Does fetchmail hand off directly to CyrusIMAP? or is it Postfix that handles it between fetchmail and CyrusIMAP?
It depends on your setup, but presumably fetchmail hands off to postfix, which then delivers to directories from which CyrusIMAP can serve out mail to end-users.
Somewhere I read about port 25?
That would be SMTP port for inbound mail.
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. 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"?? 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.
Where do I find out?
I would suggest reading a few howtos - there's plenty of good readable material on fetchmail, postfix and the whole process/setup.
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? Also, I think that some howtos might have assumed that the client would be coming to a POP server while others that it would be coming to an IMAP server, and there seem to be differences in the handling and differences in what inbound and outbound mean, depending where a program is in a chain and what the configuration of the chain is. I was guessing that "outbound" should always refer to "toward the ISP". So, when postfix picks up mail from fetchmail, that's "inbound" and is found in a different directory than when postfix picks up my client's replies from (say) CyrusIMAP? But can that second category be called "outbound" since it's coming IN to postfix, and does postfix have yet another place to put mail that it received from (say) IMAP and that is now "outbound" to the ISP? 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. 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. Anyway, I'll have stuff to play with when I get home tongight. Thanks, Kevin The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it.
* mlist@safenet-inc.com
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.
reason, most ISPs block direct mail from dynamic IP addresses to try to minimize SPAM. Relaying (outbound) thru your ISP gets past this. AIUI, outbound is _from_ your box and inbound is _to_ your box. It is possible to send and receive mail directly to/from your box and does not require a _static_ IP, but needs the help of a redirector such as no-ip.com (which I use) or dnspark.com, zoneedit.com, dyndns.com, ... -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery
Hi Kevin, In general, YAST may help you in configuring your system but not in understanding how things work. Have a look at the programs and their documentation involved instead!!! In your case fetchmail IMAP (cyrus, etc.) postfix ( if needed at all )
So, if I'm understanding this, fetchmail grabs from ISP POP and drops at some standard place (or a configured place?), Have a look at the Documentation of fetchmail http://www.catb.org/~esr/fetchmail/fetchmail-man.html#2
postfix grabs what fetchmail brought and feeds it to IMAP You can tell fetchmail to deliver directly to IMAP http://www.catb.org/~esr/fetchmail/fetchmail-man.html#2 That way you wouldn't need postfix for inbound mail.
Eek! So... if postfix is so important to the whole process -- you seem to have said it takes inbound from fetchmail and outbound from CyrusIMAP -- then it doesn't even use its own nifty directory structure? Yup, this stuff is simple and straightforward all right. <g> Cyrus IMAP is not involved in _outbound_ mail. Outbound mail is send from your email program (KMail, Thunderbird, etc.) when you press the send button. It hands it (depending how you have configured your email program) to
Postfix should accept (if configured) the mail handed from fetchmail on localhost port 25 and deliver (if configured) to imap. postfix which should send it then to its next mailhop ( very likely your ISP ). Better may be not to involve postfix and let your email program send mail directly to your ISP. That way you have to set up on program less. I am not trying to say you shouldn't use postfix. My experience is, best to keep things simple. The fewer programs involved the better. Mail transport / delivery is a world of its own. If you want to learn more about postfix have a look at the excelent docu at www.postfix.org. Ulf
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
participants (4)
-
mlist@safenet-inc.com
-
Patrick Shanahan
-
Sandy Drobic
-
Ulf Rasch