Re: [OT?] What's wrong with my exim4 configuration? [SOLVED]
Hi, I want to conclude this thread with a summary. I hope some may benefit from this. First many thanks to Gregory Nowak, Jonathan Dowland, Chris Davies, and Curt, who helped me along the way. My purpose: I wanted that the system mail notifications (cron failed jobs, etc.) to end up in my day-to-day mail box (read: public email), while a copy is kept in root local mail box (/var/mail/mail). The initial state was the default debian configuration for exim4 which is not sending mail to external addresses. The steps made are described in the original post (below). In between I inserted few comments and corrections based on what I learned here. Cheers, Itay On Sun, 10 Nov 2013, Itay wrote: Hi, I apologize for the long post. I thought it's best to put as much information including stuff inserted into configuration files and relevant parts of log file. I am struggling to configure exim4 on my home desktop to send system notifications to my public email address. So far with no success. The desktop is connected to home private LAN with 24hrs connection to internet. Can someone please hold my hand and educate me: what am I doing wrong? Here is what I did. [I replaced smtp's port with NNN. Also, assume 'machine' is output of command 'hostname', while 'machine.homenetwork' is output of 'hostname -f'] Replace these values with your local values, of course. 1. Configure exim4 # sudo dpkg-reconfigure exim4-config General type of mail configuration: => "mail sent by smarthost; received via SMTP or fetchmail" System mail name => "fastmail.fm" Also tried the default: "machine.homenetwork" This is wrong. The original value "machine.homenetwork" was correct. This original value was offered by default, by the configuration dialogue. Note: Most of the replies in this dialogue are stored in /etc/exim4/update-exim4.conf.conf The reply to this specific question is quite an exception as it is stored in the file /etc/mailname IP-addresses to listen on for incoming SMTP connections => "127.0.0.1" (default) Other destinations for which mail is accepted => "machine.homenetwork" (default) Machines to relay mail for => Leave empty (default). IP address or host name of the outgoing smarthost => "mail.messagingengine.com::NNN". Based on the data extracted from my email client I used the deprecated port number 465. This I changed to 587. Note that in contrast to one suggestion on this thread, the double-colon ('::') is required. This is documented, I believe, in exim4-config dialogue. Hide local mail name in outgoing mail? => No (default). Keep number of DNS-queries minimal (Dial-on-Demand)? => No (default). Delivery method for local mail => "mbox format in /var/mail/" (default) Split configuration into small files? => No (default). 2. Put a line in /etc/aliases 'root: root,myem...@fastmail.fm' First entry on the right-hand is for making the local copy. Second entry is for directing the mail to my public address. 3. Inserted the following lines in /etc/email-addresses root: myem...@fastmail.fm root@localhost: myem...@fastmail.fm root@localhost.localdomain: myem...@fastmail.fm root@machine: myem...@fastmail.fm root@machine.localdomain: myem...@fastmail.fm root@machine.homenetwork: myem...@fastmail.fm itayf: myem...@fastmail.fm itayf@localhost: myem...@fastmail.fm itayf@localhost.localdomain: myem...@fastmail.fm itayf@machine: myem...@fastmail.fm itayf@machine.localdomain: myem...@fastmail.fm itayf@machine.homenetwork: myem...@fastmail.fm This is perhaps over-doing, but doesn't seem to interfer. 4. Insert in /etc/exim4/passwd.client the following line: smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord 4. Update configuration and restart exim4 # sudo update-exim4.conf # sudo invoke-rc.d exim4 restart [ ok ] Stopping MTA for restart: exim4_listener. [ ok ] Restarting MTA: exim4. # sudo exim4 -qff # newaliases Run 'newaliases' every time that you edit /etc/aliases. 5. Test message: # /usr/sbin/exim4 -i root This is a test message. ^D In both exim4 runs mentioned above, add verbosity '-v' when encountering trouble. Outcome: Mail ended up in machine's root inbox, but not in my public inbox. Relevant part from /var/log/exim4: 2013-11-10 11:00:50 1VfQsq-0003B3-7m <= myem...@fastmail.fm U=itayf P=local S=327 2013-11-10 11:00:50 1VfQsq-0003B3-7m == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 Start queue run: pid=12330 2013-11-10 11:21:15 1Vf1nB-dQ-Pz == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1Vf1nB-dQ-Pz == myem...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1VfPwb-0002iA-NI == myem...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:1
Re: [OT?] What's wrong with my exim4 configuration?
On Thu, 14 Nov 2013, Jonathan Dowland wrote: On Thu, Nov 14, 2013 at 10:45:56AM +0200, Itay wrote: Newbie's question: is it a problem? Is there a risk? Not really, but some people may prefer that their internal host names and suchlike are not exposed to the outside world. I first noticed it I can sympathize with the sentiment. 'Knowledge is power!'; right? (I myself hid my local network true name behind 'machine.homenetwork' in this thread...) when trying to configure my MUA to recognise my own mails to mailing lists and replies to them - I couldn't match on message-it because they were always "@debian" despite envelope addresses being correct. It took me some time to figure out that /etc/mailname was to blame! Thanks for sharing your knowledge. I think I will conclude this thread. Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311141435550.6452@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Thu, Nov 14, 2013 at 10:45:56AM +0200, Itay wrote: > Newbie's question: is it a problem? Is there a risk? Not really, but some people may prefer that their internal host names and suchlike are not exposed to the outside world. I first noticed it when trying to configure my MUA to recognise my own mails to mailing lists and replies to them - I couldn't match on message-it because they were always "@debian" despite envelope addresses being correct. It took me some time to figure out that /etc/mailname was to blame! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20131114095337.ga24...@bryant.redmars.org
Re: [OT?] What's wrong with my exim4 configuration?
On Thu, 14 Nov 2013, Jonathan Dowland wrote: On 12 Nov 2013, at 22:06, Gregory Nowak wrote: This name won't appear on From: lines of outgoing messages if rewriting is enabled. It does leak out in message-Id strings however. Newbie's question: is it a problem? Is there a risk? [I was going to send the list a 'SOLVED' message with a summary of the thread, but will wait for responses on this branch.] Cheers, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311141043130.3640@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
> On 12 Nov 2013, at 22:06, Gregory Nowak wrote: > > This name won't appear on From: lines of outgoing messages if > rewriting > is enabled. It does leak out in message-Id strings however. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/ea155d66-5fc0-4283-84d1-ab7197b59...@debian.org
Re: [OT?] What's wrong with my exim4 configuration?
On Tue, Nov 12, 2013 at 09:39:55AM +0200, Itay wrote: > I don't remember editing /etc/mailname by hand; 'dpkg -S' says it's > not owned by any debian package. > So how this file gets its content? It was created when you installed exim, and would be changed when running dpkg-reconfigure exim4-config. The specific question which changes /etc/mailname is: "Mail Server configuration The 'mail name' is the domain name used to 'qualify' mail addresses without a domain name. This name will also be used by other programs. It should be the single, fully qualified domain name (FQDN). Thus, if a mail address on the local host is f...@example.org, the correct value for this option would be example.org. This name won't appear on From: lines of outgoing messages if rewriting is enabled. System mail name:" HTH Greg -- web site: http://www.gregn..net gpg public key: http://www.gregn..net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20131112220629.ga24...@gregn.net
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, 11 Nov 2013, Gregory Nowak wrote: On Mon, Nov 11, 2013 at 08:50:33AM +0200, Itay wrote: I was using 465 because that's how my email client (alpine) uses the provider's SMTP. It was configured some years ago, and I was not aware that a change is required. Yes, mail.messagingengine.com still seems to accept connections on tcp 465. If that works for you with alpine then leave it alone. Just be aware that since 465 is deprecated, they may choose to discontinue allowing sending of mail that way in the future. Since tcp 465 uses ssl from the start of the connection, exim would likely require additional configuration to be able to send mail on tcp 465. I'm not an exim expert though, so don't know what specifically that additional configuration would be. Greg Finally, with your help, I got exim4 to work with 587. The next step (outside this thread's issue, though) would be to verify that 587 works for my email client. (I see no reason why.) Thanks, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311120940170.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, 11 Nov 2013, Gregory Nowak wrote: On Mon, Nov 11, 2013 at 12:33:46PM +0200, Itay wrote: On Mon, 11 Nov 2013, Jonathan Dowland wrote: It looks like your mail configuration is now fixed. I agree, for the most part anyway. Finally -- I don't know if it is significant -- but I note in the output below, for example 3 lines from the bottom, that the address 'r...@fastmail.fm' appears. This should not happen, right? because fastmail.fm is my provider's public domain. email from/to r...@fastmail.fm would be suspect? Yes. I would check /etc/mailname as Jonathan suggested. It should say mynetwork instead of fastmail.fm. Changing that should fix this issue. You could also consider using procmail/maildrop as Jonathan suggested also. Greg As I mentioned in my reply to Jonathan -- this did the trick! I would like to send a well-organized summary of the thread with the resolution. So I have one follow-up question: I don't remember editing /etc/mailname by hand; 'dpkg -S' says it's not owned by any debian package. So how this file gets its content? Please educate me. Many thanks for the help! Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311120933410.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
Thanks to Jonathan and Greg, and others, it seems that the cause for the problem was found. See below. On Mon, 11 Nov 2013, Jonathan Dowland wrote: Date: Mon, 11 Nov 2013 11:33:22 + From: Jonathan Dowland To: debian-user@lists.debian.org Subject: Re: [OT?] What's wrong with my exim4 configuration? Resent-Date: Mon, 11 Nov 2013 11:33:39 + (UTC) Resent-From: debian-user@lists.debian.org On Mon, Nov 11, 2013 at 12:33:46PM +0200, Itay wrote: I tried several times, including re-issuing 'exim4 -qff'. It hangs and I have to kill it. The output is appended below. OK I wouldn't worry about the hanging from this output. I suspect it's just the SMTP client and/or server keeping the connection open in case a subsequent MAIL FROM was on the way. However Finally -- I don't know if it is significant -- but I note in the output below, for example 3 lines from the bottom, that the address 'r...@fastmail.fm' appears. That's definitely wrong. I wonder if your aliases file is to blame. Quoting your first message 2. Put a line in /etc/aliases 'root: root,myem...@fastmail.fm' Is this not a circular definition? I think not. 'root' on the right-hand side is considered a local address with domain stripped. I saw this example somewhere on the net, I can look for the reference. Anyway it works! (The purpose is to leave a copy of messages also in the local mailbox of root.) $ man 5 etc-aliases /etc/aliases is a table providing a mechanism to redirect mail for local recipients. /etc/aliases is a text file which is roughly compatible with Sendmail. The file should contain lins of the form name: address, address, ... The name is a local address without domain part. [End quote] Personally I would try to achieve what you are doing with a /root/.procmailrc file containing :0c !myem...@fastmail.fm :0 /var/mail/root Just to make sure I understand: procmail is not complementary to exim4 for my specific task, but a drop-in replacement; right? Do you have an /etc/mailname? This was it! As Greg pointed out, too. The file stored 'fastmail.fm'. I changed it to 'machine.homenetwork' and voila! Message was delivered: one copy to local root mail box, and one to my public address. Many-many thanks! Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311120917580.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, 11 Nov 2013, Gregory Nowak wrote: On Mon, Nov 11, 2013 at 08:28:31AM +0200, Itay wrote: I don't understand why ':25' is appended, and what is the meaning of that. There are a number of things I want to reply to in this thread. So, I'm going to do this in each relevant message, since that will be easier for me. Apologies if the bunch of replies to the same thread annoys anyone. To answer your question, exim was appending :25 because you specified the port to use with one colon instead of two. So, exim was using the default smtp port which is 25, to send the message. Port 25 should be used these days only when two official mail servers for a domain are sending mail to one another. You might be able to use port 25 to talk to a smarthost, but this isn't recommended, since either your ISP blocks outbound tcp 25 (which seems to be the case for you), or mail servers will refuse to accept mail from you if you have a dynamic IP address (which is what my server does among many others). Greg Thanks for clarifying this point. Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311120901460.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, Nov 11, 2013 at 12:33:46PM +0200, Itay wrote: > On Mon, 11 Nov 2013, Jonathan Dowland wrote: > >It looks like your mail configuration is now fixed. I agree, for the most part anyway. > Finally -- I don't know if it is significant -- but I note in the > output below, for example 3 lines from the bottom, that the address > 'r...@fastmail.fm' appears. > This should not happen, right? because fastmail.fm is my provider's > public domain. email from/to r...@fastmail.fm would be suspect? Yes. I would check /etc/mailname as Jonathan suggested. It should say mynetwork instead of fastmail.fm. Changing that should fix this issue. You could also consider using procmail/maildrop as Jonathan suggested also. Greg -- web site: http://www.gregn..net gpg public key: http://www.gregn..net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2013213849.gc9...@gregn.net
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, Nov 11, 2013 at 08:50:33AM +0200, Itay wrote: > I was using 465 because that's how my email client (alpine) uses the > provider's SMTP. It was configured some years ago, and I was not > aware that a change is required. Yes, mail.messagingengine.com still seems to accept connections on tcp 465. If that works for you with alpine then leave it alone. Just be aware that since 465 is deprecated, they may choose to discontinue allowing sending of mail that way in the future. Since tcp 465 uses ssl from the start of the connection, exim would likely require additional configuration to be able to send mail on tcp 465. I'm not an exim expert though, so don't know what specifically that additional configuration would be. Greg -- web site: http://www.gregn..net gpg public key: http://www.gregn..net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2013212517.gb9...@gregn.net
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, Nov 11, 2013 at 08:28:31AM +0200, Itay wrote: > I don't understand why ':25' is appended, and what is the meaning of > that. There are a number of things I want to reply to in this thread. So, I'm going to do this in each relevant message, since that will be easier for me. Apologies if the bunch of replies to the same thread annoys anyone. To answer your question, exim was appending :25 because you specified the port to use with one colon instead of two. So, exim was using the default smtp port which is 25, to send the message. Port 25 should be used these days only when two official mail servers for a domain are sending mail to one another. You might be able to use port 25 to talk to a smarthost, but this isn't recommended, since either your ISP blocks outbound tcp 25 (which seems to be the case for you), or mail servers will refuse to accept mail from you if you have a dynamic IP address (which is what my server does among many others). Greg -- web site: http://www.gregn..net gpg public key: http://www.gregn..net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2013210621.ga9...@gregn.net
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, Nov 11, 2013 at 12:33:46PM +0200, Itay wrote: > I tried several times, including re-issuing 'exim4 -qff'. > It hangs and I have to kill it. > The output is appended below. OK I wouldn't worry about the hanging from this output. I suspect it's just the SMTP client and/or server keeping the connection open in case a subsequent MAIL FROM was on the way. However > Finally -- I don't know if it is significant -- but I note in the > output below, for example 3 lines from the bottom, that the address > 'r...@fastmail.fm' appears. That's definitely wrong. I wonder if your aliases file is to blame. Quoting your first message > 2. Put a line in /etc/aliases > 'root: root,myem...@fastmail.fm' Is this not a circular definition? Personally I would try to achieve what you are doing with a /root/.procmailrc file containing :0c !myem...@fastmail.fm :0 /var/mail/root Do you have an /etc/mailname? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2013113322.ga24...@bryant.redmars.org
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, 11 Nov 2013, Jonathan Dowland wrote: On Mon, Nov 11, 2013 at 09:20:18AM +0200, Itay wrote: 3) The last command I isssued: # echo This is a test message. | exim -v -i root is still hanging. This was the behavior I was seeing yesterday as well. Try killing it and re-issuing it since you've made the other changes. It looks like your mail configuration is now fixed. I tried several times, including re-issuing 'exim4 -qff'. It hangs and I have to kill it. The output is appended below. Finally -- I don't know if it is significant -- but I note in the output below, for example 3 lines from the bottom, that the address 'r...@fastmail.fm' appears. This should not happen, right? because fastmail.fm is my provider's public domain. email from/to r...@fastmail.fm would be suspect? Output follows: [Assume: * 'machine.homenetwork' is the ouput of command 'hostname -f'. * My public address is 'myem...@fastmail.fm'.] $ sudo exim4 -v -qff LOG: queue_run MAIN Start queue run: pid=23927 -qff LOG: queue_run MAIN End queue run: pid=23927 -qff $ echo This is a test message. | /usr/sbin/exim4 -v -i root LOG: MAIN <= myem...@fastmail.fm U=myemail P=local S=327 ~ (525)$ delivering 1VfoWD-0006Dy-OG R: smarthost for r...@fastmail.fm T: remote_smtp_smarthost for r...@fastmail.fm Transport port=25 replaced by host-specific port=587 Connecting to mail.messagingengine.com [66.111.4.52]:587 ... connected SMTP<< 220 mail.messagingengine.com ESMTP ready SMTP>> EHLO machine.homenetwork SMTP<< 250-mail.messagingengine.com 250-PIPELINING 250-SIZE 7100 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 STARTTLS SMTP>> STARTTLS SMTP<< 220 2.0.0 Start TLS SMTP>> EHLO machine.homenetwork SMTP<< 250-mail.messagingengine.com 250-PIPELINING 250-SIZE 7100 250-ENHANCEDSTATUSCODES 250-8BITMIME 250-AUTH PLAIN LOGIN 250 AUTH=PLAIN LOGIN SMTP>> AUTH PLAIN SMTP<< 235 2.0.0 OK SMTP>> MAIL FROM: SIZE=1359 AUTH=myem...@fastmail.fm SMTP>> RCPT TO: SMTP>> DATA SMTP<< 250 2.1.0 Ok SMTP<< 250 2.1.5 Ok SMTP<< 354 End data with . SMTP>> writing message and terminating "." SMTP<< 250 2.0.0 Ok: queued as A0994680091 SMTP>> QUIT LOG: MAIN => r...@fastmail.fm R=smarthost T=remote_smtp_smarthost H=mail.messagingengine.com [66.111.4.52] X=TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256 DN="C=NO,ST=Oslo,L=Oslo,O=Opera Software ASA,CN=*.messagingengine.com" LOG: MAIN Completed ^C [killed] Thanks in advance, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.131220260.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, Nov 11, 2013 at 09:20:18AM +0200, Itay wrote: > 3) The last command I isssued: > # echo This is a test message. | exim -v -i root > is still hanging. > This was the behavior I was seeing yesterday as well. Try killing it and re-issuing it since you've made the other changes. It looks like your mail configuration is now fixed. > Shooting in the dark: > > A) It looks like a problem with a queue or similar? > > B) The harddrive of the sending machine has began failing. > (See http://lists.debian.org/debian-user/2013/11/msg00177.html) > I will replace it, of course. > But could there be a relation to the present problem? Very unlikely. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/2013075124.ga19...@bryant.redmars.org
Re: [OT?] What's wrong with my exim4 configuration?
On Mon, 11 Nov 2013, Itay wrote: On Sun, 10 Nov 2013, Gregory Nowak wrote: On Sun, Nov 10, 2013 at 01:15:26PM +, Chris Davies wrote: > > IP address or host name of the outgoing smarthost > > => "mail.messagingengine.com::NNN". > > Should be a single colon, not double. For example, mail.example.net:587 No, this is incorrect. When you run dpkg-reconfigure exim4-config, it says: [snip] So, the OP should have mail.messagingengine.com::587 in the exim4 config. In /etc/exim4/passwd.client, the OP should have something like: mail.messagingengine.com:username:clear_text_password Greg Will try that and report back to the list. I made the changes that Greg has recommended. After running: # update-exim4.conf # invoke-rc.d exim4 restart Stopping MTA for restart: exim4_listener. Restarting MTA: exim4. # exim4 -v -qff LOG: queue_run MAIN Start queue run: pid=21878 -qff LOG: queue_run MAIN End queue run: pid=21878 -qff # echo This is a test message. | exim -v -i root Interesting things have happened: 1) I got in my public inbox (!) a warning from my local system that a test message I sent on Saturday (48 hrs ago) was not delivered for 24 hours. The warning was issued yesterday. 2) At the same time the said test message landed in my public inbox. 3) The last command I isssued: # echo This is a test message. | exim -v -i root is still hanging. This was the behavior I was seeing yesterday as well. Shooting in the dark: A) It looks like a problem with a queue or similar? B) The harddrive of the sending machine has began failing. (See http://lists.debian.org/debian-user/2013/11/msg00177.html) I will replace it, of course. But could there be a relation to the present problem? Thanks, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.130905470.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, 10 Nov 2013, Gregory Nowak wrote: By mistake I sent my reply directly to the responder (sorry Greg) and not to the list. Here is a copy: On Sun, Nov 10, 2013 at 01:15:26PM +, Chris Davies wrote: > > IP address or host name of the outgoing smarthost > > => "mail.messagingengine.com::NNN". > > Should be a single colon, not double. For example, mail.example.net:587 No, this is incorrect. When you run dpkg-reconfigure exim4-config, it says: [snip] I will restore the double colon. [I put it there based on the docs, but did not remember the reference; it was late at night, so I did not question the responder. I simply thought I missed something... My bad.] I can also confirm this is correct, since I am using two colons here to send to a smarthost on 587. > > If you're using 486 (SMTP/SSL) you may need to tweak the TLS entries in > the configuration file. Where are you getting tcp 486 as SMTP/SSL from? On my system, /etc/services lists: "ssmtp 465/tcp smtps # SMTP over SSL" There is no mention of 486 either tcp or udp in my /etc/services. Besides that, 465 is deprecated. The port that should be used for smarthosts these days is tcp 587, and no ISP has a right to block that. In fact: I was using 465 because that's how my email client (alpine) uses the provider's SMTP. It was configured some years ago, and I was not aware that a change is required. It is strange to me, though, that alpine would be able to use port 465, while exim4 would not? "$ telnet mail.messagingengine.com 587 Trying 66.111.4.52... Connected to mail.messagingengine.com. Escape character is '^]'. 220 mail.messagingengine.com ESMTP ready quit 221 2.0.0 Bye Connection closed by foreign host." So, the OP should have mail.messagingengine.com::587 in the exim4 config. In /etc/exim4/passwd.client, the OP should have something like: mail.messagingengine.com:username:clear_text_password Greg Will try that and report back to the list. Many thanks, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.130848560.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, 10 Nov 2013, Curt wrote: On 2013-11-10, Itay wrote: R: smarthost for r...@fastmail.fm T: remote_smtp_smarthost for r...@fastmail.fm Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: **? Connection refused I thought it was port 465? Indeed. I entered 465 when answering dpkg-reconfigure questions. This is also what is recorded in /etc/exim4/update-exim4.conf.conf: dc_smarthost='mail.messagingengine.com:465' I don't understand why ':25' is appended, and what is the meaning of that. Thanks, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.130824530.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, Nov 10, 2013 at 01:15:26PM +, Chris Davies wrote: > > IP address or host name of the outgoing smarthost > > => "mail.messagingengine.com::NNN". > > Should be a single colon, not double. For example, mail.example.net:587 No, this is incorrect. When you run dpkg-reconfigure exim4-config, it says: "Package configuration Mail Server configuration Please enter the IP address or the host name of a mail server that this system should use as outgoing smarthost. If the smarthost only accepts your mail on a port different from TCP/25, append two colons and the port number (for example smarthost.example::587 or 192.168.254.254::2525). Colons in IPv6 addresses need to be doubled. If the smarthost requires authentication, please refer to the Debian-specific README files in /usr/share/doc/exim4-base for notes about setting up SMTP authentication." I can also confirm this is correct, since I am using two colons here to send to a smarthost on 587. > > If you're using 486 (SMTP/SSL) you may need to tweak the TLS entries in > the configuration file. Where are you getting tcp 486 as SMTP/SSL from? On my system, /etc/services lists: "ssmtp 465/tcp smtps # SMTP over SSL" There is no mention of 486 either tcp or udp in my /etc/services. Besides that, 465 is deprecated. The port that should be used for smarthosts these days is tcp 587, and no ISP has a right to block that. In fact: "$ telnet mail.messagingengine.com 587 Trying 66.111.4.52... Connected to mail.messagingengine.com. Escape character is '^]'. 220 mail.messagingengine.com ESMTP ready quit 221 2.0.0 Bye Connection closed by foreign host." So, the OP should have mail.messagingengine.com::587 in the exim4 config. In /etc/exim4/passwd.client, the OP should have something like: mail.messagingengine.com:username:clear_text_password Greg -- web site: http://www.gregn..net gpg public key: http://www.gregn..net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20131110204123.ga8...@gregn.net
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, 10 Nov 2013, Roger B.A. Klorese wrote: On Nov 10, 2013, at 10:07 AM, Itay wrote: On Sun, 10 Nov 2013, Chris Davies wrote: Itay wrote: IP address or host name of the outgoing smarthost => "mail.messagingengine.com::NNN". Should be a single colon, not double. For example, mail.example.net:587 OK. I Changed that. If you're using 486 (SMTP/SSL) you may need to tweak the TLS entries in the configuration file. Using 465 and ssl. Show the exact config line with 465 on it. Extracted from /etc/exim4/update-exim4.conf.conf: dc_smarthost='mail.messagingengine.com:465' Thanks, Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311102120480.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On 2013-11-10, Itay wrote: > R: smarthost for r...@fastmail.fm > T: remote_smtp_smarthost for r...@fastmail.fm > Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: **? > Connection refused I thought it was port 465? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnl7vnag.2nq.cu...@einstein.electron.org
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, 10 Nov 2013, Curt wrote: On 2013-11-10, Itay wrote: 4. Insert in /etc/exim4/passwd.client the following line: smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord This part I don't understand. I thought you were supposed to put fastmail.fm's smtp server in the first field? You got it right. This pseudo server name was mistakenly left here from preliminary versions of the message. The real passwd.client file has mail.messagingengine.com. curty@einstein:~$ host mail.messagingengine.com mail.messagingengine.com has address 66.111.4.51 mail.messagingengine.com has address 66.111.4.52 mail.messagingengine.com mail is handled by 5 in1-smtp.messagingengine.com. mail.messagingengine.com mail is handled by 20 in2-smtp.messagingengine.com. *.messagingengine.com:myem...@fastmail.fm:ClearTextPassWord Maybe I'm not getting something. Sorry for the misleading message. Itay -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311102008270.12611@gandalf.furmanet
Re: [OT?] What's wrong with my exim4 configuration?
On Sun, 10 Nov 2013, Chris Davies wrote: Chris: thanks for helping me out. Itay wrote: I am struggling to configure exim4 on my home desktop to send system notifications to my public email address [...] [I replaced smtp's port with NNN. Also, assume 'machine' is output of command 'hostname', while 'machine.homenetwork' is output of 'hostname -f'] IP address or host name of the outgoing smarthost => "mail.messagingengine.com::NNN". Should be a single colon, not double. For example, mail.example.net:587 OK. I Changed that. If you're using 486 (SMTP/SSL) you may need to tweak the TLS entries in the configuration file. Using 465 and ssl. 4. Insert in /etc/exim4/passwd.client the following line: smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord Your login account for smtp.mail.provider is "myem...@fastmail.fm", yes? It's a pseudo, as is ClearTextPassWord. The file has my real login account for smtp.mail.provider. 5. Test message: # /usr/sbin/exim4 -i root This is a test message. ^D Throw a -v (Verbose) in there, too. echo test message | exim4 -v root This hanged and I had to kill it. I tried several times. An example of output [changed real email to pseudo 'myem...@fastmail.fm']: $ echo This is a test message. | /usr/sbin/exim4 -v -i root LOG: MAIN <= myem...@fastmail.fm U=itayf P=local S=327 ~ (556)$ delivering 1VfZGa-0004AC-BY R: smarthost for r...@fastmail.fm T: remote_smtp_smarthost for r...@fastmail.fm Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.52] Connection refused Connecting to mail.messagingengine.com [66.111.4.51]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.51] Connection refused Connecting to 465 [0.0.1.209]:25 ... failed: Invalid argument LOG: MAIN 465 [0.0.1.209] Invalid argument LOG: MAIN == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (22): Invalid argument [hanging... killed] Relevant part from /var/log/exim4: 2013-11-10 11:00:50 1VfQsq-0003B3-7m <= myem...@fastmail.fm U=itayf P=local S=327 2013-11-10 11:00:50 1VfQsq-0003B3-7m == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host You've stripped out some relevant preceding messages. Something already in there has stopped the queue run for your target host. Use this instead: exim4 -qf -v $ sudo exim4 -v -qff # changed real email to pseudo 'myem...@fastmail.fm' LOG: queue_run MAIN Start queue run: pid=15258 -qff delivering 1Vf1nB-dQ-Pz (queue run pid 15258) R: system_aliases for root@machine.homenetwork R: smarthost for myem...@fastmail.fm T: remote_smtp_smarthost for @fastmail.fm Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.52] Connection refused Connecting to mail.messagingengine.com [66.111.4.51]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.51] Connection refused Connecting to 465 [0.0.1.209]:25 ... failed: Invalid argument LOG: MAIN 465 [0.0.1.209] Invalid argument LOG: MAIN == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (22): Invalid argument LOG: MAIN == myem...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (22): Invalid argument delivering 1VfQsq-0003B3-7m (queue run pid 15258) R: smarthost for r...@fastmail.fm T: remote_smtp_smarthost for r...@fastmail.fm Connecting to mail.messagingengine.com [66.111.4.51]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.51] Connection refused Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.52] Connection refused Connecting to 465 [0.0.1.209]:25 ... failed: Invalid argument LOG: MAIN 465 [0.0.1.209] Invalid argument LOG: MAIN == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (22): Invalid argument delivering 1VfNjL-000250-SG (queue run pid 15258) R: smarthost for r...@fastmail.fm T: remote_smtp_smarthost for r...@fastmail.fm Connecting to mail.messagingengine.com [66.111.4.52]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.52] Connection refused Connecting to mail.messagingengine.com [66.111.4.51]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.51] Connection refused Connecting to 465 [0.0.1.209]:25 ... failed: Invalid argument LOG: MAIN 465 [0.0.1.209] Invalid argument LOG: MAIN == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (22): Invalid argument delivering 1VfPwb-0002iA-NI (queue run pid 15258) R: smarthost for myem...@fastmail.fm T: remote_smtp_smarthost for myem...@fastmail.fm Connecting to mail.messagingengine.com [66.111.4.51]:25 ... failed: Connection refused LOG: MAIN mail.messagingengine.com [66.111.4.51] Connection refused Connecting to mail.messagingen
Re: [OT?] What's wrong with my exim4 configuration?
Itay wrote: > I am struggling to configure exim4 on my home desktop to send system > notifications to my public email address [...] > [I replaced smtp's port with NNN. Also, assume 'machine' is output of > command 'hostname', while 'machine.homenetwork' is output of 'hostname > -f'] > IP address or host name of the outgoing smarthost > => "mail.messagingengine.com::NNN". Should be a single colon, not double. For example, mail.example.net:587 If you're using 486 (SMTP/SSL) you may need to tweak the TLS entries in the configuration file. > 4. Insert in /etc/exim4/passwd.client the following line: > smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord Your login account for smtp.mail.provider is "myem...@fastmail.fm", yes? > 5. Test message: > # /usr/sbin/exim4 -i root > This is a test message. > ^D Throw a -v (Verbose) in there, too. echo test message | exim4 -v root > Relevant part from /var/log/exim4: > 2013-11-10 11:00:50 1VfQsq-0003B3-7m <= myem...@fastmail.fm U=itayf P=local > S=327 > 2013-11-10 11:00:50 1VfQsq-0003B3-7m == r...@fastmail.fm R=smarthost > T=remote_smtp_smarthost defer (-53): retry time not reached for any host You've stripped out some relevant preceding messages. Something already in there has stopped the queue run for your target host. Use this instead: exim4 -qf -v Chris -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/egd4laxrtv@news.roaima.co.uk
Re: [OT?] What's wrong with my exim4 configuration?
On 2013-11-10, Itay wrote: > 4. Insert in /etc/exim4/passwd.client the following line: > smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord This part I don't understand. I thought you were supposed to put fastmail.fm's smtp server in the first field? curty@einstein:~$ host mail.messagingengine.com mail.messagingengine.com has address 66.111.4.51 mail.messagingengine.com has address 66.111.4.52 mail.messagingengine.com mail is handled by 5 in1-smtp.messagingengine.com. mail.messagingengine.com mail is handled by 20 in2-smtp.messagingengine.com. *.messagingengine.com:myem...@fastmail.fm:ClearTextPassWord Maybe I'm not getting something. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/slrnl7v4dt.21l.cu...@einstein.electron.org
[OT?] What's wrong with my exim4 configuration?
Hi, I apologize for the long post. I thought it's best to put as much information including stuff inserted into configuration files and relevant parts of log file. I am struggling to configure exim4 on my home desktop to send system notifications to my public email address. So far with no success. The desktop is connected to home private LAN with 24hrs connection to internet. Can someone please hold my hand and educate me: what am I doing wrong? Here is what I did. [I replaced smtp's port with NNN. Also, assume 'machine' is output of command 'hostname', while 'machine.homenetwork' is output of 'hostname -f'] 1. Configure exim4 # sudo dpkg-reconfigure exim4-config General type of mail configuration: => "mail sent by smarthost; received via SMTP or fetchmail" System mail name => "fastmail.fm" Also tried the default: "machine.homenetwork" IP-addresses to listen on for incoming SMTP connections => "127.0.0.1" (default) Other destinations for which mail is accepted => "machine.homenetwork" (default) Machines to relay mail for => Leave empty (default). IP address or host name of the outgoing smarthost => "mail.messagingengine.com::NNN". Hide local mail name in outgoing mail? => No (default). Keep number of DNS-queries minimal (Dial-on-Demand)? => No (default). Delivery method for local mail => "mbox format in /var/mail/" (default) Split configuration into small files? => No (default). 2. Put a line in /etc/aliases 'root: root,myem...@fastmail.fm' 3. Inserted the following lines in /etc/email-addresses root: myem...@fastmail.fm root@localhost: myem...@fastmail.fm root@localhost.localdomain: myem...@fastmail.fm root@machine: myem...@fastmail.fm root@machine.localdomain: myem...@fastmail.fm root@machine.homenetwork: myem...@fastmail.fm itayf: myem...@fastmail.fm itayf@localhost: myem...@fastmail.fm itayf@localhost.localdomain: myem...@fastmail.fm itayf@machine: myem...@fastmail.fm itayf@machine.localdomain: myem...@fastmail.fm itayf@machine.homenetwork: myem...@fastmail.fm 4. Insert in /etc/exim4/passwd.client the following line: smtp.mail.provider:myem...@fastmail.fm:ClearTextPassWord 4. Update configuration and restart exim4 # sudo update-exim4.conf # sudo invoke-rc.d exim4 restart [ ok ] Stopping MTA for restart: exim4_listener. [ ok ] Restarting MTA: exim4. # sudo exim4 -qff # newaliases 5. Test message: # /usr/sbin/exim4 -i root This is a test message. ^D Outcome: Mail ended up in machine's root inbox, but not in my public inbox. Relevant part from /var/log/exim4: 2013-11-10 11:00:50 1VfQsq-0003B3-7m <= myem...@fastmail.fm U=itayf P=local S=327 2013-11-10 11:00:50 1VfQsq-0003B3-7m == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 Start queue run: pid=12330 2013-11-10 11:21:15 1Vf1nB-dQ-Pz == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1Vf1nB-dQ-Pz == myem...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1VfPwb-0002iA-NI == myem...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1VfNjL-000250-SG == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 1VfQsq-0003B3-7m == r...@fastmail.fm R=smarthost T=remote_smtp_smarthost defer (-53): retry time not reached for any host 2013-11-10 11:21:15 End queue run: pid=12330 Thanks in advance! Itay Notes: A. I have no trouble to access my public email from my email client (alpine) and the email provider's web interface. B. I was relying on the following documents: https://wiki.debian.org/GmailAndExim4 https://library.linode.com/email/exim/send-only-mta-debian-6-squeeze file://usr/share/doc/exim4-base/README.Debian.html https://wiki.debian.org/PkgExim4UserFAQ -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/alpine.DEB.2.02.1311101158390.7090@gandalf.furmanet