Author Topic: I can log into webmail but can't send.  (Read 137 times)

Offline 3x5

  • Newbie
  • *
  • Posts: 1
I can log into webmail but can't send.
« on: December 03, 2019, 08:03:10 PM »
Hi there, I recently set up roundmail for the first time. I rolled my own mail server using postfix, dovecot and certbot. It all works fine. I can send and receive email with Thunderbird, no problem.

However, I can't send mail with roundcube. I can log into it, but only when my default host is set to ssl://mail.mysite.com and port is 993. If it's set to localhost, I can't get in. And when I do get in, webmail seems pretty slow. The custom logo takes forever to load.

I can't send mail, no matter what I set as the smtp server. I've set it to mail.mysite.com, internalfqdn.mysite.com, localhost, localhost.localdomain, 127.0.0.1, my IP address, and all of these with ssl:// in front of them. I've tried them all with port 587, I've tried ssl:// with port 25. Nothing works.

I have my mail server set up so it forces users to use SSL for incoming mail, and STARTTLS for outgoing. They have to use ports 993 and 587. However, when I'm on the server, I can't telnet to port 143 but I can telnet to 993, 587 and 25.

in /etc/postfix/main.cf, I have this setting:
Code: [Select]
smtpd_recipient_restrictions =
   permit_mynetworks,
   permit_sasl_authenticated,
   reject_unauth_destination

I thought "permit_mynetworks" meant that local services with an exception to forced SSL.

Anyway, I am at a total loss here. My main question is how to get an email to send. After that, I should probably figure out how to connect to localhost and not mail.mysite.com.

Thank you for your help.

Online mats

  • Newbie
  • *
  • Posts: 8
Re: I can log into webmail but can't send.
« Reply #1 on: December 05, 2019, 04:34:59 PM »
Hi

I do believe that you have your web and mail services on the same server?
If you do - there is really no reason to require SSL between the two services. The data isn't sent over the network so no one can intercept it without hacking the machine first and if it's hacked, well then it doesn't help anyway.

The most likely reason for you to have issues with localhost and SSL is because the hostname must match the hostname in the certificate from the mailserver. You should get some error in the log (they are rather rough though - not giving any details)
 
I would like to suggest that you start simple and use unencrypted IMAP on port 143 and SMTP on port 25 for outgoing. 

If you use unencrypted SMTP you should be able to do something like
$config['smtp_server'] = 'localhost';
$config['smtp_port'] = 25;

I do not use dovecot myself so I can't help you with that part of the config.