You are not logged in.

#1 2017-10-31 23:55:06

loadlover
Member
Registered: 2017-05-10
Posts: 103

[SOLVED] Sending mail using Alpine & Postfix/Dovecot

Hello all,

I'm trying to get Postfix to send mail using SMTP. But first, here's my set up:

1. The remote machine is a VPS running Arch with Postfix and Dovecot as the major email server components. I've managed to get IMAP working OK, in a very feeble, simple configuration.

2. My local machine is running Arch with Alpine as an email client. Using it, I can login to, and receive email from the server.

But now, back to my problem, and to re-state it: I want to use Alpine to write the email, have it login to the server and have the server send my email using SMTP to, well, wherever I want.

What I have managed to achieve so far is to login to the server using SSH, compose an email there, on the server, and use Postfix's sendmail directly. Yep, this works. What does NOT work is using Alpine to do this as I have described above. Alpine simply tells me the connection is refused when it attempts to send mail to the server.

Am I trying to do the right thing, even? Pointers please. Perhaps an outline of what I should be doing? Or which logs would be helpful to post at this stage? A firm bit of guiding would be greatly appreciated.

Thanks,

Loady

Last edited by loadlover (2017-11-01 23:16:37)

Offline

#2 2017-11-01 03:52:02

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

You could try isolating the issue. Can you send email using alpine for a google account, say? (Or whatever you prefer.) Can you read email using alpine from your server? How have you configured alpine?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2017-11-01 09:49:16

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

So the problem is that the server isn't accepting SMTP connections then?
Can you contact the servers SMTP port manually from your local machine?

telnet mail.example.com 25

Edit - the above will only work if running SMTP/STARTTLS on port 25, you'll need to check port 465 if using SSMTP.

Last edited by Slithery (2017-11-01 09:55:10)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-11-01 10:56:39

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

slithery wrote:

So the problem is that the server isn't accepting SMTP connections then?
Can you contact the servers SMTP port manually from your local machine?

telnet mail.example.com 25

Yes, port 25 works. 465 doesn't. Here's the output for both:

$ telnet imfatant.com 25
Trying 139.162.242.64...
Connected to imfatant.com.
Escape character is '^]'.
220 imfatant.com ESMTP Postfix
$ telnet imfatant.com 465
Trying 139.162.242.64...
Connection failed: Connection refused
Trying 2a01:7e00::f03c:91ff:fe03:45ed...
telnet: Unable to connect to remote host: Connection refused

What's my next step? Sorry to be so ignorant, but I am..

Last edited by loadlover (2017-11-01 10:57:41)

Offline

#5 2017-11-01 11:21:50

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

Scratch that..

My local machine's VPN was the problem. When performing the telnet test (in the post above) I was running Windows (I dual boot) without a VPN, and it worked. Then I rebooted and carried out telnetting under Arch and it didn't work. The difference is that my VPN comes up automatically upon booting up Arch.

OK, that's solved. Now I get an SSL negotiation failure message, but I reckon I know how to deal with this. I will let you know. Thanks for now smile

Offline

#6 2017-11-01 11:28:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

Don't know if you've seen this, it's the guide I've always used for my mailservers.
It's targeted at Debian but can be used for Arch with minimal changes.

Even if you don't use it the introduction is a great place to see where all the pieces fit together.

https://workaround.org/ispmail

Last edited by Slithery (2017-11-01 11:42:30)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2017-11-01 23:13:55

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: [SOLVED] Sending mail using Alpine & Postfix/Dovecot

slithery wrote:

Even if you don't use it the introduction is a great place to see where all the pieces fit together.
https://workaround.org/ispmail

Nice:)

I got it all working now. My error was silly. I'd set Alpine up with:

imfatant.com:25/user=someone@imfatant.com/ssl

rather than:

imfatant.com:25/user=someone@imfatant.com/tls

I didn't think it would matter the way I had my Postfix config set. Oh well. It's all good now.

Last edited by loadlover (2017-11-01 23:15:06)

Offline

Board footer

Powered by FluxBB