LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-16-2018, 03:52 AM   #1
garydale
Member
 
Registered: Feb 2007
Posts: 142

Rep: Reputation: 23
sending e-mail through Rogers.com using Exim4


I'm trying to set up exim4 on my Debian/Buster workstation to work with my new ISP (Rogers.com). They require an SSL connection on port 465, which isn't unusual, but I can't get it to work. They do require something they call an app password for unusual programs, which seems to be just a very strong password that they generate for the account.

I've set up exim4 (dpkg-reconfigure exim4-config) to use smtp.broadband.rogers.com::465 as the remote smarthost (the onscreen instructions specify using :: ).

I've set passwd.client to use all the various servers that seem to be connected with smtp.broadband.rogers.com as it sends e-mail (e.g. *.yahoo.com, *.yahoodns.net) so that it should use the app password no matter where it's asked for it.

I've also used the advice from https://halon.io/blog/how-to-test-sm...-command-line/ to test my connection. In particular, after trying the command

openssl s_client -connect smtp.broadband.rogers.com:465 -starttls smtp

and the same thing without the -starttls smtp, I concluded that it isn't requiring starttls. This is confirmed by my Thunderbird settings.

I was able to log onto the smtp server using the base64 encoded username and app password (as per halon.io's instructions) for the account I'm trying to send mail from.

I've added tls_on_connect_ports = 465 to the config and as a localmacro but that didn't make any difference.

Of course rogers doesn't support Linux so I need help to find out how to make this work.

I believe that Debian compiles exim4 against GnuTLS rather than the OpenSSL package I used for my tests, but Debian's wiki suggests this shouldn't be the issue.

Any ideas?

Last edited by garydale; 05-16-2018 at 08:45 AM.
 
Old 05-16-2018, 08:34 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
What exactly are you doing? What result do you expect? What result are you getting? What does yahoo have to do with rogers.com? Do you have an understanding of how email is supposed to work? Whatever your sending goes to the SMTP server. That's where you need the password. Wherever it goes after that doesn't require a password from the sender.
 
Old 05-16-2018, 08:57 AM   #3
garydale
Member
 
Registered: Feb 2007
Posts: 142

Original Poster
Rep: Reputation: 23
[QUOTE=AwesomeMachine;5855469]What exactly are you doing?
I'm trying to send e-mail from the command line.

What result do you expect?
I expect the mail command to send e-mail

What result are you getting?
Mail goes into the queue and eventually freezes

What does yahoo have to do with rogers.com?
Yahoo provides the e-mail services for rogers. The initial smtp server smtp.broadband.rogers.com but eventually mail goes through yahoo servers.

Do you have an understanding of how email is supposed to work?
Yes.

Whatever your sending goes to the SMTP server. That's where you need the password.
However if you look online, you will find that it's not quite that simple. Passwd.client frequently needs wildcard selections since the exact server isn't known until the e-mail is sent. Rogers (and others, like Google) even use multiple TLDs so you need multiple lines in passwd.client to ensure you get the correct server(s).

Wherever it goes after that doesn't require a password from the sender.[/QUOTE]
But the problem I'm having is to get it through the smarthost.
 
Old 05-16-2018, 02:08 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I know not about exim4. That said, I question the use of :: between the server and the port. Have you tried with a single colon?

Do you reference multiple servers in Thunderbird? I'd think the setup would be exactly like a working Thunderbird setup...the challenge being what goes where in the config file.

Please post the command you're using at the command line. Obfuscate as necessary.
 
Old 05-16-2018, 06:59 PM   #5
garydale
Member
 
Registered: Feb 2007
Posts: 142

Original Poster
Rep: Reputation: 23
[QUOTE=scasey;5855601]I know not about exim4. That said, I question the use of :: between the server and the port. Have you tried with a single colon?

The screen is quite clear about using double colons. See the attached file.

Do you reference multiple servers in Thunderbird? I'd think the setup would be exactly like a working Thunderbird setup...the challenge being what goes where in the config file.


Even if that were true, the Exim4 configuration contains the same information. Also, the testing with the OpenSSL client shows that I have the correct information to make a connection. The problem is that Exim4 and Rogers don't want to talk.

Please post the command you're using at the command line. Obfuscate as necessary.[/QUOTE]
I'm running Exim4 as a daemon, not from a command line. There are hundreds of command line arguments that I don't want to wade through. Running it as service to connect to a smarthost is normally pretty straightforward. However it doesn't want to connect to Rogers.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20180516_194429.png
Views:	26
Size:	56.4 KB
ID:	27651  
 
Old 05-16-2018, 08:17 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
It might be easier to use msmtp to send mail. It's much simpler to configure than exim, which is designed more as a mail server than a simple MTA.

If you want to try it, you will need separate MTA to fetch the mail. Fetchmail is a good one.
 
Old 05-16-2018, 09:07 PM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I'm sorry...you said your goal was to send email from the command line. I'm asking for the command line entry you're using to do that.

You've asked about configuring exim4, but what are you trying to accomplish here?

Have you tried to configure mail/mailx and use that?
 
Old 05-17-2018, 03:18 AM   #8
garydale
Member
 
Registered: Feb 2007
Posts: 142

Original Poster
Rep: Reputation: 23
While I appreciate the suggestions that I use another package, that simply moves the problem to that package. Moreover, mail/mailx still requires an MTA (indeed, I use mail/mailx frequently to send mail, but s-nail works better. However neither work without a working MTA). That's why seeing the mail command line I am using is useless. The problem isn't in the mail command.
 
Old 05-17-2018, 12:42 PM   #9
garydale
Member
 
Registered: Feb 2007
Posts: 142

Original Poster
Rep: Reputation: 23
What I was afraid of - introducing a new package creates new errors.

Anyway, I removed exim4 and brought in msmtp. I've got it working now, after much gnashing of teeth and pulling of hair.

I had to tell it not to cert_check, and also had to create a "default" account (actually called default) in order to get it to work with s-nail. I'm wondering whether its the certificate check that caused the issue with exim4? While I'm vulnerable to a "man in the middle attack" for outgoing e-mail using msmtp without a certificate check, I'm not overly worried about that.

However, I've now got another problem. I need to have a different reply-to address or (preferably) a from address that is separate from the username used to log onto the smarthost.

While mail allows me to use -r to do that, mail sent using a return address that is different from the msmtp from address fails. I get the message 'mail: cannot send message: Process exited with a non-zero status".

S-nail is a little more informative on this. It tells me
ending e-mail to Gary Dale at garydale@rogers.com
sendmail: envelope from address <a from address> not accepted by the server
sendmail: server message: 550 Request failed; Mailbox unavailable
sendmail: could not send mail (account default from /home/garydale/.msmtprc)
done

I'm able to get a reply-to with s-nail using -S replyto=<replyto address> which works for now.

However now I run into a different problem. Rogers limits the amount of e-mail I can send per account. Since msmtp doesn't queue e-mail, any messages that the Rogers/Yahoo servers don't accept get discarded. I believe that under Exim4 they would remain in the queue and be re-tried later.

Last edited by garydale; 05-18-2018 at 07:33 PM. Reason: added new details
 
  


Reply

Tags
smtp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sending mail via telnet not sending to cc address socalheel Linux - Server 2 10-03-2013 07:57 AM
local mail from Exim4, other mail to ISP waterhorse Linux - Networking 3 04-05-2010 05:33 AM
Exim4 not receiving mail. jim_fields Linux - Networking 2 10-28-2009 11:39 AM
Exim4 local mail Sputnikc Linux - Software 0 10-02-2007 02:55 AM
Receiving e-mail from Rogers.com lxandrthegr8 Linux - Networking 3 08-12-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration