Re: virtual mailbox domains??

2021-12-09 Thread raf
On Thu, Dec 09, 2021 at 04:32:26PM -0500, post...@aecperformance.com wrote:

> Thanks *so much* for all your help.
> 
> Another complete rebuild and I think I’ve finally got it.
> 
> I was able to log into mail.sizzelicks.com for smok...@sizzelicks.com
>  this time with no trouble.
> 
> I sent an email to smok...@sizzelicks.com
>  from a gmail account and was able to
> retrieve it in Thunderbird.
> 
> I replied to the gmail email and in gmail.com I got the response.
> 
> Now I can add email accounts to the database for any of our domains
> and they work!
> 
> I've added responses below.

Well done. Glad to help.

cheers,
raf



RE: virtual mailbox domains??

2021-12-09 Thread postfix
Thanks *so much* for all your help.

Another complete rebuild and I think I’ve finally got it.

I was able to log into mail.sizzelicks.com for smok...@sizzelicks.com 
<mailto:smok...@sizzelicks.com>  this time with no trouble.

I sent an email to smok...@sizzelicks.com <mailto:smok...@sizzelicks.com>  from 
a gmail account and was able to retrieve it in Thunderbird.

I replied to the gmail email and in gmail.com I got the response.

 

Now I can add email accounts to the database for any of our domains and they 
work!

I've added responses below.

 

-Original Message-
From: owner-postfix-us...@postfix.org  On 
Behalf Of raf
Sent: Thursday, December 9, 2021 1:07 AM
To: postfix-users@postfix.org
Subject: Re: virtual mailbox domains??

 

On Tue, Dec 07, 2021 at 10:25:44AM -0500,  <mailto:post...@aecperformance.com> 
post...@aecperformance.com wrote:

 

> Sorry I sent this from the wrong email address.

> 

> VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2

> 

> I'm making progress but still not there.

> 

> Any help would be greatly appreciated.

> 

> I'm getting the errors:

> 

> warning: SASL: Connect to private/auth failed: Connection refused

> 

> fatal: no SASL authentication mechanisms

> 

>  

> 

> I have a param in main.cf: smtpd_sasl_path = private/auth

> 

> I do not have a folder /etc/postfix/private/auth

> 

> I do have a folder /etc/postfix/auth but nothing is in it.

> 

> How can I fix this error?

 

The reference to private/auth is referring to dovecot's authentication socket 
under postfix's chroot directory.

It's in /var/spool/postfix/private/auth, not /etc/postfix.

 

You have set that up in dovecot's config:

 

  service auth {

unix_listener /var/spool/postfix/private/auth {

  group = postfix

  mode = 0666

  user = postfix

}

unix_listener auth-userdb {

  mode = 0600

  user = vmail

}

user = dovecot

  }

 

My version of that looks like:

 

  service auth {

unix_listener /var/spool/postfix/private/auth {

  mode = 0666

}

  }

 

So it looks like that should be OK.

Does /var/spool/postfix/private/auth exist?

Mine has root as owner/group. Yours should have postfix as owner/group. But 
that shouldn't matter as long as the mode is 0666.

I must of changed the mode to 0660 but per your suggestion I changed it to 
0666. Thanks.

Yes it does exist.

ls -l /var/spool/postfix/private/auth

srw-rw 1 postfix postfix 0 Dec  8 21:50 /var/spool/postfix/private/auth

 

 

If not, check dovecot's log messages for problems with it.

But I don't know what to look for. The dovecot mailing list folks might be more 
useful for that.

 

It should exist and be used by dovecot. If you have lsof installed, you can 
check that:

 

  > sudo lsof /var/spool/postfix/private/auth

  COMMAND PIDUSER   FD   TYPE DEVICE SIZE/OFF NODE NAME

  dovecot   17341root   53u  unix 0x8e43c69f7400  0t0 16873340 
/var/spool/postfix/private/auth type=STREAM

  auth1521507 dovecot   13u  unix 0x8e43c69f7400  0t0 16873340 
/var/spool/postfix/private/auth type=STREAM

  auth1521507 dovecot   21u  unix 0x8e43c417c800  0t0 69451443 
/var/spool/postfix/private/auth type=STREAM

  auth1521507 dovecot   22u  unix 0x8e43c9fc2400  0t0 69453124 
/var/spool/postfix/private/auth type=STREAM

 

sudo lsof /var/spool/postfix/private/auth

COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME

dovecot 4550 root   58u  unix 0x  0t0 1305802532 
/var/spool/postfix/private/auth type=STREAM

 

Something else that might or might not be a (different) problem is that the TLS 
certificate at mail.sizzlelicks.com doesn't certify the domain 
mail.sizzlelicks.com. Its list of domains contains sizzelicks.com and  
<http://www.sizzelicks.com> www.sizzelicks.com but not mail.sizzelicks.com. 
That might cause problems with Thunderbird trying to connect for IMAPS. I think 
you reported such an error message earlier. So you might want to add the 
mail.sizzelicks.com domain to that certificate. But that's not related to the 
failure to connect to the dovecot auth socket.

 

You are correct and I sure wish I saw *this*  a week ago. 

I did a rebuild due to lots of trouble trying to add the certs.

Now I’ve got it all back up with the certificates for all of the 
mail.mydomain.com  MX records.

THANK YOU

 

 

cheers,

raf

 

> -Original Message-

> From:  <mailto:owner-postfix-us...@postfix.org> 
> owner-postfix-us...@postfix.org

> < <mailto:owner-postfix-us...@postfix.org> 
> mailto:owner-postfix-us...@postfix.org>  

>  < <mailto:owner-postfix-us...@postfix.org> 
> mailto:owner-postfix-us...@postfix.org> > On Behalf Of Wietse Venema

> Sent: Monday, December 6, 2021 11:04 AM

> To: Postf

Re: virtual mailbox domains??

2021-12-08 Thread raf
On Tue, Dec 07, 2021 at 10:25:44AM -0500, post...@aecperformance.com wrote:

> Sorry I sent this from the wrong email address.
> 
> VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2
> 
> I'm making progress but still not there.
> 
> Any help would be greatly appreciated.
> 
> I'm getting the errors:
> 
> warning: SASL: Connect to private/auth failed: Connection refused
> 
> fatal: no SASL authentication mechanisms
> 
>  
> 
> I have a param in main.cf: smtpd_sasl_path = private/auth
> 
> I do not have a folder /etc/postfix/private/auth
> 
> I do have a folder /etc/postfix/auth but nothing is in it.
> 
> How can I fix this error?

The reference to private/auth is referring to dovecot's
authentication socket under postfix's chroot directory.
It's in /var/spool/postfix/private/auth, not /etc/postfix.

You have set that up in dovecot's config:

  service auth {
unix_listener /var/spool/postfix/private/auth {
  group = postfix
  mode = 0666
  user = postfix
}
unix_listener auth-userdb {
  mode = 0600
  user = vmail
}
user = dovecot
  }

My version of that looks like:

  service auth {
unix_listener /var/spool/postfix/private/auth {
  mode = 0666
}
  }

So it looks like that should be OK.
Does /var/spool/postfix/private/auth exist?
Mine has root as owner/group. Yours should
have postfix as owner/group. But that shouldn't
matter as long as the mode is 0666.

If not, check dovecot's log messages for problems with it.
But I don't know what to look for. The dovecot mailing list
folks might be more useful for that.

It should exist and be used by dovecot. If you have lsof installed,
you can check that:

  > sudo lsof /var/spool/postfix/private/auth
  COMMAND PIDUSER   FD   TYPE DEVICE SIZE/OFF NODE NAME
  dovecot   17341root   53u  unix 0x8e43c69f7400  0t0 16873340 
/var/spool/postfix/private/auth type=STREAM
  auth1521507 dovecot   13u  unix 0x8e43c69f7400  0t0 16873340 
/var/spool/postfix/private/auth type=STREAM
  auth1521507 dovecot   21u  unix 0x8e43c417c800  0t0 69451443 
/var/spool/postfix/private/auth type=STREAM
  auth1521507 dovecot   22u  unix 0x8e43c9fc2400  0t0 69453124 
/var/spool/postfix/private/auth type=STREAM

Something else that might or might not be a (different)
problem is that the TLS certificate at
mail.sizzlelicks.com doesn't certify the domain
mail.sizzlelicks.com. Its list of domains contains
sizzelicks.com and www.sizzelicks.com but not
mail.sizzelicks.com. That might cause problems with
Thunderbird trying to connect for IMAPS. I think you
reported such an error message earlier. So you might
want to add the mail.sizzelicks.com domain to that
certificate. But that's not related to the failure to
connect to the dovecot auth socket.

cheers,
raf

> -Original Message-
> From: owner-postfix-us...@postfix.org
> <mailto:owner-postfix-us...@postfix.org>   <mailto:owner-postfix-us...@postfix.org> > On Behalf Of Wietse Venema
> Sent: Monday, December 6, 2021 11:04 AM
> To: Postfix users  <mailto:postfix-users@postfix.org> >
> Subject: Re: virtual mailbox domains??
> 
>  
> 
>  <mailto:post...@aecperformance.com> post...@aecperformance.com:
> 
> > Command: sudo postfix status
> 
> > postfix/postfix-script: the Postfix mail system is running: PID: 38284
> 
>  
> 
> Good.
> 
>  
> 
> > I attempted to send an email to  <mailto:smok...@sizzelicks.com>
> smok...@sizzelicks.com 
> 
> > < <mailto:smok...@sizzelicks.com> mailto:smok...@sizzelicks.com> . It
> bounced.
> 
>  
> 
> What is the Postfix logging for this? Be sure to include more than only the
> delivery error (i.e. logging from pickup or smtpd; cleanup; qmgr; ...).
> 
>  
> 
> This is the first problem that you need to fix.
> 
>  
> 
> > In the log I see a few attempts to connect from spammers. I do not see 
> 
> > my laptop IP or anything at all about what I did.
> 
>  
> 
> That is the second problem to fix. I suspect a firewalling or routing
> problem.
> 
>  
> 
> Wietse
> 


Re: virtual mailbox domains??

2021-12-07 Thread Alex JOST



Am 07.12.2021 um 16:25 schrieb post...@aecperformance.com:

Sorry I sent this from the wrong email address.
VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2

I'm making progress but still not there.
Any help would be greatly appreciated.

I'm getting the errors:
warning: SASL: Connect to private/auth failed: Connection refused
fatal: no SASL authentication mechanisms

I have a param in main.cf: smtpd_sasl_path = private/auth
I do not have a folder /etc/postfix/private/auth
I do have a folder /etc/postfix/auth but nothing is in it.

How can I fix this error?



Did you install the 'libsasl2-modules' package? What's the output of 
'postconf -A'?


--
Alex JOST


Re: virtual mailbox domains??

2021-12-07 Thread postfix
Sorry I sent this from the wrong email address.

VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2

 

I'm making progress but still not there.

Any help would be greatly appreciated.

 

I'm getting the errors:

warning: SASL: Connect to private/auth failed: Connection refused

fatal: no SASL authentication mechanisms

 

I have a param in main.cf: smtpd_sasl_path = private/auth

I do not have a folder /etc/postfix/private/auth

I do have a folder /etc/postfix/auth but nothing is in it.

 

How can I fix this error?

 

 

 

 

-Original Message-
From: owner-postfix-us...@postfix.org
<mailto:owner-postfix-us...@postfix.org>  mailto:owner-postfix-us...@postfix.org> > On Behalf Of Wietse Venema
Sent: Monday, December 6, 2021 11:04 AM
To: Postfix users mailto:postfix-users@postfix.org> >
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> Command: sudo postfix status

> postfix/postfix-script: the Postfix mail system is running: PID: 38284

 

Good.

 

> I attempted to send an email to  <mailto:smok...@sizzelicks.com>
smok...@sizzelicks.com 

> < <mailto:smok...@sizzelicks.com> mailto:smok...@sizzelicks.com> . It
bounced.

 

What is the Postfix logging for this? Be sure to include more than only the
delivery error (i.e. logging from pickup or smtpd; cleanup; qmgr; ...).

 

This is the first problem that you need to fix.

 

> In the log I see a few attempts to connect from spammers. I do not see 

> my laptop IP or anything at all about what I did.

 

That is the second problem to fix. I suspect a firewalling or routing
problem.

 

Wietse



RE: virtual mailbox domains??

2021-12-07 Thread postfix
VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2

 

I'm making progress but still not there.

Any help would be greatly appreciated.

 

I'm getting the errors:

warning: SASL: Connect to private/auth failed: Connection refused

fatal: no SASL authentication mechanisms

 

I have a param in main.cf: smtpd_sasl_path = private/auth

I do not have a folder /etc/postfix/private/auth

I do have a folder /etc/postfix/auth but nothing is in it.

 

How can I fix this error?

 

 

 

 

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Monday, December 6, 2021 11:04 AM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> Command: sudo postfix status

> postfix/postfix-script: the Postfix mail system is running: PID: 38284

 

Good.

 

> I attempted to send an email to  <mailto:smok...@sizzelicks.com>
smok...@sizzelicks.com 

> < <mailto:smok...@sizzelicks.com> mailto:smok...@sizzelicks.com> . It
bounced.

 

What is the Postfix logging for this? Be sure to include more than only the
delivery error (i.e. logging from pickup or smtpd; cleanup; qmgr; ...).

 

This is the first problem that you need to fix.

 

> In the log I see a few attempts to connect from spammers. I do not see 

> my laptop IP or anything at all about what I did.

 

That is the second problem to fix. I suspect a firewalling or routing
problem.

 

Wietse



RE: virtual mailbox domains??

2021-12-06 Thread postfix
I finally figured out why I couldn't send emails to smok...@sizzelicks.com
<mailto:smok...@sizzelicks.com> .

I am attempting to migrate from shared hosting to a VPS.

My shared hosting account at hostgator.com still had the domain
sizzelicks.com set up.

Every time I tried to send email FROM a hostgator account hostgator
intercepted the message because it hosted (or thought it hosted)
sizzelicks.com.

 

I removed sizzelicks.com from the domains on hostgator and now I can send an
email to smok...@sizzelicks.com <mailto:smok...@sizzelicks.com>  without it
bouncing.

I don't know what happened on the server end. The mailbox folder exists and
dovecot has files in there but I can't say it contains emails.

I still can't connect to the mailbox. I'm guessing that's a dovecot/imap
problem.

 

Maybe you can help me now?

Dec 6 23:17:01 softlinksys postfix/smtpd[48166]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Dec 6 23:17:01 softlinksys postfix/smtpd[48166]: connect from
gateway21.websitewelcome.com[192.185.45.159]
Dec 6 23:17:01 softlinksys postfix/smtpd[48166]: warning: SASL: Connect to
private/auth failed: Connection refused
Dec 6 23:17:01 softlinksys postfix/smtpd[48166]: fatal: no SASL
authentication mechanisms
Dec 6 23:17:02 softlinksys postfix/master[47990]: warning: process
/usr/lib/postfix/sbin/smtpd pid 48166 exit status 1
Dec 6 23:17:02 softlinksys postfix/master[47990]: warning:
/usr/lib/postfix/sbin/smtpd: bad command startup -- throttling

 

 

 

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Monday, December 6, 2021 11:04 AM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> Command: sudo postfix status

> postfix/postfix-script: the Postfix mail system is running: PID: 38284

 

Good.

 

> I attempted to send an email to  <mailto:smok...@sizzelicks.com>
smok...@sizzelicks.com 

> < <mailto:smok...@sizzelicks.com> mailto:smok...@sizzelicks.com> . It
bounced.

 

What is the Postfix logging for this? Be sure to include more than only the
delivery error (i.e. logging from pickup or smtpd; cleanup; qmgr; ...).

 

This is the first problem that you need to fix.

 

> In the log I see a few attempts to connect from spammers. I do not see 

> my laptop IP or anything at all about what I did.

 

That is the second problem to fix. I suspect a firewalling or routing
problem.

 

Wietse



Re: virtual mailbox domains??

2021-12-06 Thread Jaroslaw Rafa
Dnia  6.12.2021 o godz. 12:42:26 post...@aecperformance.com pisze:
> I've created a small app on sizzelicks.com.
> I've added a record in the mysql virtual_users table: t...@sizzelicks.com
> with the domain_id set as the id for the domain sizzelicks.com.
> You can change the first part of the email.
> You can view the live logs and you can clear them.
> I'll set the permissions back when we're done.
> 
> Maybe this will help you help me solve my problem.
> https://sizzelicks.com/LogLook.php
> If you have any problems with it let me know and I'll fix them.
> It tested OK for me.

I sent you a test message and in your mail.log I see that your Postfix seems
to have accepted and delivered it; no bounce:

Dec 6 19:11:57 softlinksys postfix/smtpd[39656]: connect from 
rafa.eu.org[217.182.79.147]
Dec 6 19:11:59 softlinksys postfix/smtpd[39656]: 04E4CA06C5: 
client=rafa.eu.org[217.182.79.147]
Dec 6 19:11:59 softlinksys postfix/cleanup[39659]: 04E4CA06C5: 
message-id=<20211206191156.ga8...@rafa.eu.org>
Dec 6 19:11:59 softlinksys postfix/qmgr[38286]: 04E4CA06C5: from=, size=1200, 
nrcpt=1 (queue active)
Dec 6 19:11:59 softlinksys postfix/smtpd[39656]: disconnect from 
rafa.eu.org[217.182.79.147] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 
commands=7
Dec 6 19:11:59 softlinksys dovecot: lmtp(39661): Connect from local
Dec 6 19:11:59 softlinksys dovecot: lmtp(t...@sizzelicks.com)<39661>: 
msgid=<20211206191156.ga8...@rafa.eu.org>: saved mail to INBOX
Dec 6 19:11:59 softlinksys dovecot: lmtp(39661): Disconnect from local: Client 
has quit the connection (state=READY)
Dec 6 19:11:59 softlinksys postfix/lmtp[39660]: 04E4CA06C5: to=, 
relay=aecperformance.com[private/dovecot-lmtp], delay=0.23, 
delays=0.19/0.01/0.01/0.02, dsn=2.0.0, status=sent (250 2.0.0 
V/yJDH9grmHtmgAAdabr2Q Saved)
Dec 6 19:11:59 softlinksys postfix/qmgr[38286]: 04E4CA06C5: removed

It's only strange why your qmgr is logging empty "from", and lmtp empty
"to". But this message should be somewhere on your system; look for it.
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."


RE: virtual mailbox domains??

2021-12-06 Thread postfix
I've created a small app on sizzelicks.com.
I've added a record in the mysql virtual_users table: t...@sizzelicks.com
with the domain_id set as the id for the domain sizzelicks.com.
You can change the first part of the email.
You can view the live logs and you can clear them.
I'll set the permissions back when we're done.

Maybe this will help you help me solve my problem.
https://sizzelicks.com/LogLook.php
If you have any problems with it let me know and I'll fix them.
It tested OK for me.

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Monday, December 6, 2021 11:04 AM
To: Postfix users 
Subject: Re: virtual mailbox domains??

post...@aecperformance.com:
> Command: sudo postfix status
> postfix/postfix-script: the Postfix mail system is running: PID: 38284

Good.

> I attempted to send an email to smok...@sizzelicks.com 
> <mailto:smok...@sizzelicks.com> . It bounced.

What is the Postfix logging for this? Be sure to include more than only the
delivery error (i.e. logging from pickup or smtpd; cleanup; qmgr; ...).

This is the first problem that you need to fix.

> In the log I see a few attempts to connect from spammers. I do not see 
> my laptop IP or anything at all about what I did.

That is the second problem to fix. I suspect a firewalling or routing
problem.

Wietse



Re: virtual mailbox domains??

2021-12-06 Thread Wietse Venema
post...@aecperformance.com:
> Command: sudo postfix status
> postfix/postfix-script: the Postfix mail system is running: PID: 38284

Good.

> I attempted to send an email to smok...@sizzelicks.com
>  . It bounced.

What is the Postfix logging for this? Be sure to include more than
only the delivery error (i.e. logging from pickup or smtpd; cleanup;
qmgr; ...).

This is the first problem that you need to fix.

> In the log I see a few attempts to connect from spammers. I do not
> see my laptop IP or anything at all about what I did.

That is the second problem to fix. I suspect a firewalling or routing
problem.

Wietse


RE: virtual mailbox domains??

2021-12-06 Thread postfix
dovecot -n

# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf

# Pigeonhole version 0.5.7.2 ()

# OS: Linux 5.4.0 x86_64 Ubuntu 20.04.3 LTS ext4

# Hostname: softlinksys.com

auth_mechanisms = plain login

mail_location = maildir:/var/mail/vhosts/%d/%n

mail_privileged_group = mail

namespace inbox {

  inbox = yes

  location =

  mailbox Drafts {

special_use = \Drafts

  }

  mailbox Junk {

special_use = \Junk

  }

  mailbox Sent {

special_use = \Sent

  }

  mailbox "Sent Messages" {

special_use = \Sent

  }

  mailbox Trash {

special_use = \Trash

  }

  prefix =

}

passdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocols = imap pop3 lmtp

service auth-worker {

  user = vmail

}

service auth {

  unix_listener /var/spool/postfix/private/auth {

group = postfix

mode = 0666

user = postfix

  }

  unix_listener auth-userdb {

mode = 0600

user = vmail

  }

  user = dovecot

}

service imap-login {

  inet_listener imap {

port = 143

  }

  inet_listener imaps {

port = 993

ssl = yes

  }

}

service lmtp {

  unix_listener /var/spool/postfix/private/dovecot-lmtp {

group = postfix

mode = 0600

user = postfix

  }

}

service pop3-login {

  inet_listener pop3 {

port = 110

  }

  inet_listener pop3s {

port = 995

ssl = yes

  }

}

ssl = required

ssl_cert = 

RE: virtual mailbox domains??

2021-12-06 Thread postfix
postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

append_dot_mydomain = no

biff = no

compatibility_level = 2

inet_interfaces = all

mailbox_size_limit = 0

mydestination = localhost

myhostname = aecperformance.com

mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128

myorigin = /etc/mailname

readme_directory = no

recipient_delimiter = +

relayhost =

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks,
rej
ect_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

smtpd_tls_auth_only = yes

smtpd_tls_cert_file = /etc/letsencrypt/live/aecperformance.com/fullchain.pem

smtpd_tls_key_file = /etc/letsencrypt/live/aecperformance.com/privkey.pem

smtpd_tls_security_level = may

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

virtual_mailbox_domains =
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

virtual_transport = lmtp:unix:private/dovecot-lmtp

 

postconf -Mf

smtp   inet  n   -   y   -   -   smtpd

submission inet  n   -   y   -   -   smtpd

-o syslog_name=postfix/submission

-o smtpd_tls_security_level=encrypt

-o smtpd_sasl_auth_enable=yes

-o smtpd_tls_auth_only=yes

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

pickup unix  n   -   y   60  1   pickup

cleanupunix  n   -   y   -   0   cleanup

qmgr   unix  n   -   n   300 1   qmgr

tlsmgr unix  -   -   y   1000?   1   tlsmgr

rewriteunix  -   -   y   -   -   trivial-rewrite

bounce unix  -   -   y   -   0   bounce

defer  unix  -   -   y   -   0   bounce

trace  unix  -   -   y   -   0   bounce

verify unix  -   -   y   -   1   verify

flush  unix  n   -   y   1000?   0   flush

proxymap   unix  -   -   n   -   -   proxymap

proxywrite unix  -   -   n   -   1   proxymap

smtp   unix  -   -   y   -   -   smtp

relay  unix  -   -   y   -   -   smtp

-o syslog_name=postfix/$service_name

showq  unix  n   -   y   -   -   showq

error  unix  -   -   y   -   -   error

retry  unix  -   -   y   -   -   error

discardunix  -   -   y   -   -   discard

local  unix  -   n   n   -   -   local

virtualunix  -   n   n   -   -   virtual

lmtp   unix  -   -   y   -   -   lmtp

anvil  unix  -   -   y   -   1   anvil

scache unix  -   -   y   -   1   scache

postlogunix-dgram n  -   n   -   1   postlogd

maildrop   unix  -   n   n   -   -   pipe flags=DRhu

user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp   unix  -   n   n   -   -   pipe flags=Fqhu

user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail unix  -   n   n   -   -   pipe flags=F
user=ftn

argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)

bsmtp  unix  -   n   n   -   -   pipe flags=Fq.

user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient

scalemail-backend unix - n   n   -   2   pipe flags=R

user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}

${user} ${extension}

mailmanunix  -   n   n   -   -   pipe flags=FR

user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}

${user}

 

 

Kristy Atkins

ViviData SaaS

 



RE: virtual mailbox domains??

2021-12-06 Thread postfix
I have both postfix and dovecot running.

Command: sudo postfix status

postfix/postfix-script: the Postfix mail system is running: PID: 38284

Command: sudo systemctl status dovecot.service

Active: active (running) since Mon 2021-12-06 12:48:45 UTC; 2h 29min ago

 

I've checked all 3 mysql connections using postmap.
They connected with the correct response for sizzelicks.com,
smok...@sizzelicks.com   and
spa...@sizzelicks.com   (alias) like they did
before.

 

I have verified that ufw allows the appropriate ports (see below).

 

I stopped postfix and dovecot.

I cleared the log, then started postfix and dovecot (successfully this
time).

I attempted to send an email to smok...@sizzelicks.com
 . It bounced.

I attempted to connect via Thunderbird to the mailbox of
smok...@sizzelicks.com  .

The mail server set (smtp & imap) was mail.sizzelicks.com.

The error was connection timed out.

 

In the log I see a few attempts to connect from spammers. I do not see my
laptop IP or anything at all about what I did.

You see I can send this email from my laptop just fine, yes?

Also I used telnet from my laptop to sizzelicks.com on port 25 and connected
with no problem.

It returned aecperformance.com which is what I have myhostname set as in
main.cf

The certificate set in main.cf is the certificate chain for my websites (all
working fine under ssl).

/etc/letsencrypt/live/aecperformance.com/fullchain.pem

/etc/letsencrypt/live/aecperformance.com/privkey.pem

 

mail.log

Dec  6 15:20:02 softlinksys postfix/postfix-script[38115]: warning: symlink
leaves directory: /etc/postfix/./makedefs.out

Dec  6 15:20:02 softlinksys postfix/postfix-script[38282]: starting the
Postfix mail system

Dec  6 15:20:02 softlinksys postfix/master[38284]: daemon started -- version
3.4.13, configuration /etc/postfix

Dec  6 15:20:13 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
starting up for imap, pop3, lmtp (core dumps disabled)

Dec  6 15:20:30 softlinksys dovecot: imap-login: Disconnected (auth failed,
1 attempts in 2 secs): user=, method=PLAIN,
rip=79.106.224.142, lip=194.163.45.150, TLS, session=

Dec  6 15:20:40 softlinksys postfix/smtpd[38325]: warning: hostname
ip-201-148-246-68.sulig.net.br does not resolve to address 201.148.246.68

Dec  6 15:20:40 softlinksys postfix/smtpd[38325]: connect from
unknown[201.148.246.68]

Dec  6 15:20:41 softlinksys postfix/smtpd[38325]: lost connection after EHLO
from unknown[201.148.246.68]

Dec  6 15:20:41 softlinksys postfix/smtpd[38325]: disconnect from
unknown[201.148.246.68] ehlo=1 commands=1

Dec  6 15:24:01 softlinksys postfix/anvil[38328]: statistics: max connection
rate 1/60s for (smtp:201.148.246.68) at Dec  6 15:20:40

Dec  6 15:24:01 softlinksys postfix/anvil[38328]: statistics: max connection
count 1 for (smtp:201.148.246.68) at Dec  6 15:20:40

Dec  6 15:24:01 softlinksys postfix/anvil[38328]: statistics: max cache size
1 at Dec  6 15:20:40

Dec  6 15:24:02 softlinksys dovecot: imap-login: Disconnected (auth failed,
1 attempts in 2 secs): user=, method=PLAIN,
rip=103.5.75.215, lip=194.163.45.150, TLS, session=<0/Gc2HvSPetnBUvX>

 

sudo ufw status

Status: active

 

To Action  From

-- --  

22 ALLOW   Anywhere

21 ALLOW   Anywhere

20 ALLOW   Anywhere

80 ALLOW   Anywhere

443ALLOW   Anywhere

3306   ALLOW   67.8.3.170

25 ALLOW   Anywhere

465ALLOW   Anywhere

587ALLOW   Anywhere

110ALLOW   Anywhere

995ALLOW   Anywhere

993ALLOW   Anywhere

22 (v6)ALLOW   Anywhere (v6)

21 (v6)ALLOW   Anywhere (v6)

20 (v6)ALLOW   Anywhere (v6)

80 (v6)ALLOW   Anywhere (v6)

443 (v6)   ALLOW   Anywhere (v6)

25 (v6)ALLOW   Anywhere (v6)

465 (v6)   ALLOW   Anywhere (v6)

587 (v6)   ALLOW   Anywhere (v6)

110 (v6)   ALLOW   Anywhere (v6)

995 (v6)   ALLOW   Anywhere (v6)

993 (v6)   ALLOW   Anywhere (v6)

 

Kristy Atkins

ViviData SaaS

 



Re: virtual mailbox domains??

2021-12-06 Thread Wietse Venema
Wietse Venema:
> post...@aecperformance.com:
> > You have my config. Please let me know why postfix won't run.
> 
> It was running, according to your logs:
> 
> Dec  5 21:33:26 softlinksys postfix/postfix-script[31361]: starting the 
> Postfix mail system
> Dec  5 21:33:26 softlinksys postfix/master[31363]: daemon started -- version 
> 3.4.13, configuration /etc/postfix
> 
> If the Postfix master is no longer running, then you need to find
> out what is killing your Postfix processes.

To find out if the master is running use "sudo postfix status", 
instead of using systemctl commands.

Wietse

> If the Postfix master is still running, connect to port 25
> 
> $ telnet name-of-host 25
> 
> And tell us what you get.
> 
>   Wietse
> 


Re: virtual mailbox domains??

2021-12-06 Thread Wietse Venema
post...@aecperformance.com:
> You have my config. Please let me know why postfix won't run.

It was running, according to your logs:

Dec  5 21:33:26 softlinksys postfix/postfix-script[31361]: starting the Postfix 
mail system
Dec  5 21:33:26 softlinksys postfix/master[31363]: daemon started -- version 
3.4.13, configuration /etc/postfix

If the Postfix master is no longer running, then you need to find
out what is killing your Postfix processes.

If the Postfix master is still running, connect to port 25

$ telnet name-of-host 25

And tell us what you get.

Wietse


RE: virtual mailbox domains??

2021-12-06 Thread postfix
I just stopped postfix and dovecot, then cleared the logs then restarted
postfix and dovecot.

The status of postfix says active (exited). The status of dovecot says:
active (running)

syslog

Dec  6 12:48:45 softlinksys systemd[1]: Started Dovecot IMAP/POP3 email
server.

Dec  6 12:48:45 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
starting up for imap, pop3, lmtp (core dumps disabled)

 

Postfix is not logging anything at all. This has gone from bad to worse.

You have my config. Please let me know why postfix won't run.

 

 

>From what you post here, I have an impression that you have multiple
problems and are trying to solve them all at once, which usually never
succeeds. Try to debug and solve one thing at a time.

 

First, make sure that DNS records are actually correctly set up and point to
the correct hosts.

Our VPS IP is 194.163.45.150. You can easily check this:

 

https://mxtoolbox.com/SuperTool.aspx?action=a%3asizzelicks.com=toolpage

 

https://mxtoolbox.com/SuperTool.aspx?action=mx%3asizzelicks.com=toolpage

You can check them for softlinksys.com/mail.softlinksys.com also and see
that the IP is the same.

 

Second, make sure that your services are actually running, try checking if
Postfix delivers the mail by telnetting locally to port 25, then checking
logs and checking the destination folder where the mail is supposed to
appear.

It turns out that I can't make postfix run. I start it and then check its
status and it says  active (exited)

 

At the very end, when you are absolutely sure everything is working, you
should try to configure an email client like Thunderbird and check email
sending/receiving with it.

I did and it did not work even when postfix was running. The error was auth
failed

 

Not everything at once!

 

 

--

Regards,

   Jaroslaw Rafa

 r...@rafa.eu.org

--

"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."



Re: virtual mailbox domains??

2021-12-06 Thread Jaroslaw Rafa
>From what you post here, I have an impression that you have multiple
problems and are trying to solve them all at once, which usually never
succeeds. Try to debug and solve one thing at a time.

First, make sure that DNS records are actually correctly set up and point to
the correct hosts.

Second, make sure that your services are actually running, try checking if
Postfix delivers the mail by telnetting locally to port 25, then checking
logs and checking the destination folder where the mail is supposed to appear.

At the very end, when you are absolutely sure everything is working, you
should try to configure an email client like Thunderbird and check email
sending/receiving with it.

Not everything at once!
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."


Re: virtual mailbox domains??

2021-12-05 Thread raf
On Sun, Dec 05, 2021 at 05:26:54PM -0500, post...@aecperformance.com wrote:

> OK, our VPS is back up and running.
> 
> If you log
> 
> I did the installation of postfix and dovecot from this tutorial.
> 
> https://yiworkdisk.netlify.app/en/linux/install_postfix.html
> 
>  
> 
> Command line tests for msql connections:
> 
> sudo postmap -q sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
> 
> 1
> 
> sudo postmap -q smok...@sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
> 
> 1
> 
> sudo postmap -q spa...@sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-alias-maps.cf
> 
> smok...@sizzelicks.com  
> 
>  
> 
> Mail Host Folders:
> 
> /var/mail/vhosts/softlinksys.com
> 
> /var/mail/vhosts/sizzelicks.com
> 
>  
> 
> Postfix and dovecot are installed and when I use the command: sudo service
> dovecot restart it starts and returns the cursor with no problem.
> 
>  
> 
> I just tried to send an email to smok...@sizzelicks.com
>   (see above) from MS Outlook on a laptop I
> got this:
> 
> Server error: '550 No Such User Here"'
> 
> I tried to set up a mailbox in Thunderbird for the email:
> smok...@sizzelicks.com  
> 
> I got a message saying that it could not connect.
> 
>  
> 
> This time I've got nothing in the logs about trying to send the email or
> about trying to connect to the mailbox.
> 
> Look above, you'll see that I did connect to mysql for both the domain and
> the email.
> This time I did use sha512 for the password.
> 
>  
> 
> I got the certificate from letsencrypt, specifically for
> mail.softlinksys.com.
> 
> The path to the file was saved in the config for postfix and dovecot.
> 
>  
> 
> I stopped postfix and dovecot, cleared the log, started postfix & dovecot
> (no problem).
> Then I tried to send smok...@sizzelicks.com 
> an email and then tried to create a mailbox in Thunderbird & connect it for
> smok...@sizzelicks.com  
> 
>  
> 
> It took me less than an hour from a rebuild to set up the firewall, ftp
> access, apache2 ssl secured, running php connecting to mysql for multiple
> virtual hosts. 
> 
> No problem; my sites are running fine.
> 
>  
> 
> I absolutely *cannot* make the mail server work. I started this Wednesday
> before Thanksgiving, 12 hour days - I cannot make it work.
> 
>  
> 
> Look at: https://sizzelicks.com
> 
>  
> 
> mail.log
> 
> Dec  5 21:33:26 softlinksys postfix/postfix-script[31194]: warning: symlink
> leaves directory: /etc/postfix/./makedefs.out
> 
> Dec  5 21:33:26 softlinksys postfix/postfix-script[31361]: starting the
> Postfix mail system
> 
> Dec  5 21:33:26 softlinksys postfix/master[31363]: daemon started -- version
> 3.4.13, configuration /etc/postfix
> 
> Dec  5 21:33:34 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
> starting up for imap, pop3, lmtp (core dumps disabled)
> 
> I'll send the configs in multiple emails next.
> 
> Kristy Atkins
> ViviData SaaS

I've just had another look, and I'm still not seeing
postfix/dovecot running. The only port scan difference
between now and when I last looked is that port 443 is
now open:

  > nmap -sT sizzelicks.com
  Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-06 12:41 AEDT
  Nmap scan report for sizzelicks.com (194.163.45.150)
  Host is up (0.20s latency).
  Other addresses for sizzelicks.com (not scanned): 2a02:4780:10:e096::1
  rDNS record for 194.163.45.150: aecperformance.com
  Not shown: 995 filtered tcp ports (no-response)
  PORTSTATE  SERVICE
  20/tcp  closed ftp-data
  21/tcp  open   ftp
  22/tcp  open   ssh
  80/tcp  open   http
  443/tcp open   https

  > nmap -sT -6 2a02:4780:10:e096::1
  Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-06 12:45 AEDT
  Nmap scan report for aecperformance.com (2a02:4780:10:e096::1)
  Host is up (0.19s latency).
  Not shown: 995 filtered tcp ports (no-response)
  PORTSTATE  SERVICE
  20/tcp  closed ftp-data
  21/tcp  open   ftp
  22/tcp  open   ssh
  80/tcp  open   http
  443/tcp open   https

Ports 25/587 (for postfix) and 143/993 (for dovecot)
should be open.

Perhaps something is causing both services to terminate
(e.g. The OOM killer?). Check all of your logs (not
just mail logs) to investigate why they aren't running.

cheers,
raf



Re: virtual mailbox domains??

2021-12-05 Thread Wietse Venema
You have not shown any evidence that your client actually connects
to Postfix.

Wietse


RE: virtual mailbox domains??

2021-12-05 Thread postfix
dovecot -n

# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf

# Pigeonhole version 0.5.7.2 ()

# OS: Linux 5.4.0 x86_64 Ubuntu 20.04.3 LTS ext4

# Hostname: softlinksys.com

auth_mechanisms = plain login

mail_location = maildir:/var/mail/vhosts/%d/%n

mail_privileged_group = mail

namespace inbox {

  inbox = yes

  location =

  mailbox Drafts {

special_use = \Drafts

  }

  mailbox Junk {

special_use = \Junk

  }

  mailbox Sent {

special_use = \Sent

  }

  mailbox "Sent Messages" {

special_use = \Sent

  }

  mailbox Trash {

special_use = \Trash

  }

  prefix =

}

passdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocols = imap pop3 lmtp

service auth-worker {

  user = vmail

}

service auth {

  unix_listener /var/spool/postfix/private/auth {

group = postfix

mode = 0666

user = postfix

  }

  unix_listener auth-userdb {

mode = 0600

user = vmail

  }

  user = dovecot

}

service imap-login {

  inet_listener imap {

port = 143

  }

  inet_listener imaps {

port = 993

ssl = yes

  }

}

service lmtp {

  unix_listener /var/spool/postfix/private/dovecot-lmtp {

group = postfix

mode = 0600

user = postfix

  }

}

service pop3-login {

  inet_listener pop3 {

port = 110

  }

  inet_listener pop3s {

port = 995

ssl = yes

  }

}

ssl = required

ssl_cert = 

RE: virtual mailbox domains??

2021-12-05 Thread postfix
postconf -n

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

append_dot_mydomain = no

biff = no

compatibility_level = 2

inet_interfaces = all

inet_protocols = all

mailbox_command = procmail -a "$EXTENSION"

mailbox_size_limit = 0

mydestination = $myhostname, softlinksys.com, localhost.com, , localhost

myhostname = localhost

mynetworks = 127.0.0.0/8 [:::127.0.0.0]/104 [::1]/128

myorigin = /etc/mailname

readme_directory = no

recipient_delimiter = +

relayhost =

smtp_tls_security_level = may

smtp_use_tls = yes

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

smtpd_tls_cert_file =
/etc/ssl/certs//etc/letsencrypt/live/mail.softlinksys.com/fullchain.pem

smtpd_tls_key_file = /etc/letsencrypt/live/mail.softlinksys.com/privkey.pem

smtpd_tls_security_level = may

smtpd_use_tls = yes

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

virtual_mailbox_domains =
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

virtual_transport = lmtp:unix:private/dovecot-lmtp

 

postconf Mf

smtp   inet  n   -   y   -   -   smtpd

submission inet  n   -   y   -   -   smtpd

-o syslog_name=postfix/submission

-o smtpd_tls_security_level=encrypt

   -o smtpd_sasl_auth_enable=yes

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

pickup unix  n   -   y   60  1   pickup

cleanupunix  n   -   y   -   0   cleanup

qmgr   unix  n   -   n   300 1   qmgr

tlsmgr unix  -   -   y   1000?   1   tlsmgr

rewriteunix  -   -   y   -   -   trivial-rewrite

bounce unix  -   -   y   -   0   bounce

defer  unix  -   -   y   -   0   bounce

trace  unix  -   -   y   -   0   bounce

verify unix  -   -   y   -   1   verify

flush  unix  n   -   y   1000?   0   flush

proxymap   unix  -   -   n   -   -   proxymap

proxywrite unix  -   -   n   -   1   proxymap

smtp   unix  -   -   y   -   -   smtp

relay  unix  -   -   y   -   -   smtp

-o syslog_name=postfix/$service_name

showq  unix  n   -   y   -   -   showq

error  unix  -   -   y   -   -   error

retry  unix  -   -   y   -   -   error

discardunix  -   -   y   -   -   discard

local  unix  -   n   n   -   -   local

virtualunix  -   n   n   -   -   virtual

lmtp   unix  -   -   y   -   -   lmtp

anvil  unix  -   -   y   -   1   anvil

scache unix  -   -   y   -   1   scache

postlogunix-dgram n  -   n   -   1   postlogd

maildrop   unix  -   n   n   -   -   pipe flags=DRhu

user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp   unix  -   n   n   -   -   pipe flags=Fqhu

user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail unix  -   n   n   -   -   pipe flags=F
user=ftn

argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)

bsmtp  unix  -   n   n   -   -   pipe flags=Fq.

user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient

scalemail-backend unix - n   n   -   2   pipe flags=R

user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}

${user} ${extension}

mailmanunix  -   n   n   -   -   pipe flags=FR

user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}

${user}

 

 

Kristy Atkins

ViviData SaaS

 



RE: virtual mailbox domains??

2021-12-05 Thread postfix
OK, our VPS is back up and running.

If you log

I did the installation of postfix and dovecot from this tutorial.

https://yiworkdisk.netlify.app/en/linux/install_postfix.html

 

Command line tests for msql connections:

sudo postmap -q sizzelicks.com
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

1

sudo postmap -q smok...@sizzelicks.com
mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

1

sudo postmap -q spa...@sizzelicks.com
mysql:/etc/postfix/mysql-virtual-alias-maps.cf

smok...@sizzelicks.com  

 

Mail Host Folders:

/var/mail/vhosts/softlinksys.com

/var/mail/vhosts/sizzelicks.com

 

Postfix and dovecot are installed and when I use the command: sudo service
dovecot restart it starts and returns the cursor with no problem.

 

I just tried to send an email to smok...@sizzelicks.com
  (see above) from MS Outlook on a laptop I
got this:

Server error: '550 No Such User Here"'

I tried to set up a mailbox in Thunderbird for the email:
smok...@sizzelicks.com  

I got a message saying that it could not connect.

 

This time I've got nothing in the logs about trying to send the email or
about trying to connect to the mailbox.

Look above, you'll see that I did connect to mysql for both the domain and
the email.
This time I did use sha512 for the password.

 

I got the certificate from letsencrypt, specifically for
mail.softlinksys.com.

The path to the file was saved in the config for postfix and dovecot.

 

I stopped postfix and dovecot, cleared the log, started postfix & dovecot
(no problem).
Then I tried to send smok...@sizzelicks.com 
an email and then tried to create a mailbox in Thunderbird & connect it for
smok...@sizzelicks.com  

 

It took me less than an hour from a rebuild to set up the firewall, ftp
access, apache2 ssl secured, running php connecting to mysql for multiple
virtual hosts. 

No problem; my sites are running fine.

 

I absolutely *cannot* make the mail server work. I started this Wednesday
before Thanksgiving, 12 hour days - I cannot make it work.

 

Look at: https://sizzelicks.com

 

mail.log

Dec  5 21:33:26 softlinksys postfix/postfix-script[31194]: warning: symlink
leaves directory: /etc/postfix/./makedefs.out

Dec  5 21:33:26 softlinksys postfix/postfix-script[31361]: starting the
Postfix mail system

Dec  5 21:33:26 softlinksys postfix/master[31363]: daemon started -- version
3.4.13, configuration /etc/postfix

Dec  5 21:33:34 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
starting up for imap, pop3, lmtp (core dumps disabled)

 

I'll send the configs in multiple emails next.

 

Kristy Atkins

ViviData SaaS

 



Re: virtual mailbox domains??

2021-12-05 Thread Benny Pedersen

On 2021-12-05 03:53, raf wrote:


I just tried to send an email to smok...@sizzelicks.com
but the connection timed out. nmap shows:


may it be a webserver without mx ?

owner would most likely just miss a null mx ?


Re: virtual mailbox domains??

2021-12-04 Thread raf
On Fri, Dec 03, 2021 at 11:39:52AM -0500, post...@aecperformance.com wrote:

> VPS Ubuntu 20.04 postfix 3.4.13 and dovecot 2.3.7.2
> 
> Virtual Mailboxes MySql
> 
>  
> 
> Our server hosts multiple mail domains each having multiple email addresses.
> 
> Domain: sizzelicks.com has an MX record pointing to mail.sizzelicks.com
> showing the IP: 194:163:45:150 which is our VPS IP.
> 
> https://mxtoolbox.com/SuperTool.aspx?action=mx%3asizzelicks.com=toolpage
> 
>  
> 
> We have a domain: sizzelicks.com (I tried mail.sizzelicks.com also) in our
> MySql virtual_domains table.

The virtual domain should be sizzelicks.com (which is
to be used in the email addresses themselves), not
mail.sizzelicks.com (which is just the target of
sizzelicks.com's MX record).

> We have an address: smok...@sizzelicks.com 
> as the email field in our MySql virtual_ users table.
> 
> Command line tests:
> 
> sudo postmap -q sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf 
> 
> 1
> 
> sudo postmap -q smok...@sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
> 
> 1
> 
> sudo postmap -q spa...@sizzelicks.com
> mysql:/etc/postfix/mysql-virtual-alias-maps.cf
> 
> smok...@sizzelicks.com
> 
> 
> I cannot send an email to smok...@sizzelicks.com.
> I've tried setting the domain (MySql virtual_domains) as both sizzelicks.com
> and mail.sizzelicks.com.
> The email bounces in either case.

I just tried to send an email to smok...@sizzelicks.com
but the connection timed out. nmap shows:

  > nmap -sT mail.sizzelicks.com
  Starting Nmap 7.92 ( https://nmap.org ) at 2021-12-05 13:08 AEDT
  Nmap scan report for mail.sizzelicks.com (194.163.45.150)
  Host is up (0.19s latency).
  Other addresses for mail.sizzelicks.com (not scanned): 2a02:4780:10:e096::1
  rDNS record for 194.163.45.150: aecperformance.com
  Not shown: 995 filtered tcp ports (no-response)
  PORTSTATE  SERVICE
  20/tcp  closed ftp-data
  21/tcp  open   ftp
  22/tcp  open   ssh
  80/tcp  open   http
  443/tcp closed https

  Nmap done: 1 IP address (1 host up) scanned in 13.78 seconds

It looks like neither Postfix nor Dovecot are running
there right now. Could that have been the case when you
tried? Presumably not, or Thunderbird wouldn't have been
able to connect.

> I created an account for smok...@sizzelicks.com
>   in Thunderbird on a Windows client.
> 
> If I set the IMAP and SMTP server as sizzelicks.com Thunderbird will
> connect.
> 
> If I set the IMAP and SMTP server as mail.sizzelicks.com Thunderbird will
> NOT connect.

If the connection you are referring to is the IMAP
(port 143) connection (as opposed to the port 587
connection), the problem might be related to the domain
names associated with the TLS certificate. Thunderbird
expects the hostname to match the certificate (at least
for IMAP/POP). But if that were the problem, Thunderbird
would connect but it would then probably tell you that
the certificate is invalid and refuse to use it.

The certificate you are using is a LetsEncrypt
certificate for mail.softlinksys.com. Perhaps that
certificate includes the domain sizzelicks.com but not
mail.sizzelicks.com. That might explain why an IMAPS
connection in Thunderbird succeeds with one but not the
other. You can check which domains are include in that
certificate with "sudo certbot certificates". You might
need to add the mail.sizzelicks.com domain to that
certificate (or tell Thunderbird to connect to the
host mail.softlinksys.com instead).

> How can I correlate sizzelicks.com with mail.sizzelicks.com in postfix and
> dovecot.

Not sure, but bear in mind that, even though they have
the same IP addresses, sizzelicks.com belongs in the
email addresses, and mail.sizzelicks.com belongs in
attempts to connect to the mail server, because the MX
record for sizzelicks.com points to
mail.sizzelicks.com. So Thunderbird should be
connecting to mail.sizzelicks.com (or maybe
mail.softlinksys.com). If it doesn't work, check
Thunderbird's error messages. I think it has a
"connection doctor" that you can look at.

> How can I debug/resolve this problem?

Um, you might need a new service provider. I looked at
the webpage for softlinksys.com (the value of
$myhostname) and there's an image of a sign saying:

  "Sorry We're CLOSED Out of business"

Your first step is to get Postfix and Dovecot running on the/a server.
Then you can try to send an email again and look for the relevant
log messages.

cheers,
raf

> Kristy Atkins
> ViviData SaaS


Re: virtual mailbox domains??

2021-12-04 Thread raf
On Fri, Dec 03, 2021 at 02:59:01PM -0500, post...@aecperformance.com wrote:

> I tried to send  the logs and configs. 
> 
> I cleared the logs before I: started postfix & dovecot; attempted to send an
> email; attempted to create a mail account in Thunderbird.
> 
> Then I retrieved syslog and mail.log.
> 
>  
> For configs I did: postconf -n postconf Mf dovecot -n
> 
> The email bounced because it was too long.
> 
> I really need help and I'm finding it almost as difficult as finding the
> answers to my problem.
> 
> What do I do now?

Only include the Postfix log messages that relate to
(or happen within a few seconds of) a single attempt to
send an email to that address. Then it shouldn't be too
large. It might help to include any Dovecot log
messages from the same time.

cheers,
raf



Re: virtual mailbox domains??

2021-12-03 Thread Wietse Venema
post...@aecperformance.com:
> I stopped postfix and dovecot, 
> cleared the logs, 
> started postfix and dovecot, 
> attempted to send an email to smok...@sizzelicks.com (I don't see this in
> the logs) and then 
> attempted to create a mail account in Thunderbird for smok...@sizzelicks.com

Indeed there is nothing in the logs that shows attempts to receive
or deliver email. Could it be possible that your client is talking
to a different machine?

Wietse


RE: virtual mailbox domains??

2021-12-03 Thread postfix
dovcot -n

# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf

# Pigeonhole version 0.5.7.2 ()

# OS: Linux 5.4.0 x86_64 Ubuntu 20.04.3 LTS ext4

# Hostname: softlinksys.com

auth_mechanisms = plain login

auth_username_format = %n

mail_location = maildir:/var/mail/vhosts/%d/%n

mail_privileged_group = mail

namespace inbox {

  inbox = yes

  location =

  mailbox Drafts {

auto = create

special_use = \Drafts

  }

  mailbox Junk {

auto = create

special_use = \Junk

  }

  mailbox Sent {

auto = create

special_use = \Sent

  }

  mailbox "Sent Messages" {

special_use = \Sent

  }

  mailbox Trash {

auto = create

special_use = \Trash

  }

  prefix =

}

passdb {

  args = /etc/dovecot/dovecot-sql.conf.ext

  driver = sql

}

protocols = imap pop3 lmtp

service auth-worker {

  user = vmail

}

service auth {

  unix_listener /var/spool/postfix/private/auth {

group = postfix

mode = 0660

user = postfix

  }

  unix_listener auth-userdb {

mode = 0600

user = vmail

  }

  user = dovecot

}

service imap-login {

  inet_listener imap {

port = 143

  }

  inet_listener imaps {

port = 993

ssl = yes

  }

}

service lmtp {

  unix_listener /var/spool/postfix/private/dovecot-lmtp {

group = postfix

mode = 0600

user = postfix

  }

}

service pop3-login {

  inet_listener pop3 {

port = 110

  }

  inet_listener pop3s {

port = 995

ssl = yes

  }

}

ssl = required

ssl_cert =  On
Behalf Of Wietse Venema
Sent: Friday, December 3, 2021 1:35 PM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> How can I debug/resolve this problem?

 

By sharing Postfix logs, in addition to Postfix configurations.

 

"email to X bounces" is not sufficient to determine *WHY* delivery is
failing.

 

Wietse



RE: virtual mailbox domains??

2021-12-03 Thread postfix
 

postconf n

append_dot_mydomain = no

biff = no

compatibility_level = 2

inet_interfaces = all

mailbox_size_limit = 0

mydestination = localhost

myhostname = softlinksys.com

readme_directory = no

recipient_delimiter = +

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_invalid_hostname, reject_unknown_client_hostname

smtpd_helo_restrictions = reject_unknown_helo_hostname

smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,reject_unauth_destination

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated,
defer_unauth_destination

smtpd_sasl_auth_enable = yes

smtpd_sasl_path = private/auth

smtpd_sasl_type = dovecot

smtpd_sender_restrictions = reject_unknown_sender_domain, permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn_sender

smtpd_tls_auth_only = yes

smtpd_tls_cert_file =
/etc/letsencrypt/live/mail.softlinksys.com/fullchain.pem

smtpd_tls_key_file = /etc/letsencrypt/live/mail.softlinksys.com/privkey.pem

smtpd_use_tls = yes

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

virtual_mailbox_domains =
mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

virtual_transport = lmtp:unix:private/dovecot-lmtp

 

postconf -Mf

smtp   inet  n   -   y   -   -   smtpd

submission inet  n   -   y   -   -   smtpd

-o syslog_name=postfix/submission

-o smtpd_tls_security_level=encrypt

-o smtpd_sasl_auth_enable=yes

-o smtpd_sasl_type=dovecot

-o smtpd_sasl_path=private/auth

-o smtpd_reject_unlisted_recipient=no

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

-o milter_macro_daemon_name=ORIGINATING

smtps  inet  n   -   y   -   -   smtpd

-o syslog_name=postfix/smtps

-o smtpd_tls_wrappermode=yes

-o smtpd_sasl_auth_enable=yes

-o smtpd_sasl_type=dovecot

-o smtpd_sasl_path=private/auth

-o smtpd_client_restrictions=permit_sasl_authenticated,reject

-o milter_macro_daemon_name=ORIGINATING

pickup unix  n   -   y   60  1   pickup

cleanupunix  n   -   y   -   0   cleanup

qmgr   unix  n   -   n   300 1   qmgr

tlsmgr unix  -   -   y   1000?   1   tlsmgr

rewriteunix  -   -   y   -   -   trivial-rewrite

bounce unix  -   -   y   -   0   bounce

defer  unix  -   -   y   -   0   bounce

trace  unix  -   -   y   -   0   bounce

verify unix  -   -   y   -   1   verify

flush  unix  n   -   y   1000?   0   flush

proxymap   unix  -   -   n   -   -   proxymap

proxywrite unix  -   -   n   -   1   proxymap

smtp   unix  -   -   y   -   -   smtp

relay  unix  -   -   y   -   -   smtp

-o syslog_name=postfix/$service_name

showq  unix  n   -   y   -   -   showq

error  unix  -   -   y   -   -   error

retry  unix  -   -   y   -   -   error

discardunix  -   -   y   -   -   discard

local  unix  -   n   n   -   -   local

virtualunix  -   n   n   -   -   virtual

lmtp   unix  -   -   y   -   -   lmtp

anvil  unix  -   -   y   -   1   anvil

scache unix  -   -   y   -   1   scache

postlogunix-dgram n  -   n   -   1   postlogd

maildrop   unix  -   n   n   -   -   pipe flags=DRhu

user=vmail argv=/usr/bin/maildrop -d ${recipient}

uucp   unix  -   n   n   -   -   pipe flags=Fqhu

user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail unix  -   n   n   -   -   pipe flags=F
user=ftn

argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)

bsmtp  unix  -   n   n   -   -   pipe flags=Fq.

user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient

scalemail-backend unix - n   n   -   2   pipe flags=R

user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop}

${user} ${extension}

mailmanunix  -   n   n   -   -   pipe flags=FR

user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop}

${user}

 

 

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Friday, December 3, 2021 1:35 PM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> How can I debu

RE: virtual mailbox domains??

2021-12-03 Thread postfix
Thunderbird



 

 

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Friday, December 3, 2021 1:35 PM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> How can I debug/resolve this problem?

 

By sharing Postfix logs, in addition to Postfix configurations.

 

"email to X bounces" is not sufficient to determine *WHY* delivery is
failing.

 

Wietse



RE: virtual mailbox domains??

2021-12-03 Thread postfix
I stopped postfix and dovecot, 
cleared the logs, 
started postfix and dovecot, 
attempted to send an email to smok...@sizzelicks.com (I don't see this in
the logs) and then 
attempted to create a mail account in Thunderbird for smok...@sizzelicks.com

syslog
Dec  3 19:26:55 softlinksys systemd[1]: Starting Postfix Mail Transport
Agent (instance -)...
Dec  3 19:26:55 softlinksys postfix/postfix-script[5508]: warning: symlink
leaves directory: /etc/postfix/./makedefs.out
Dec  3 19:26:56 softlinksys postfix/postfix-script[5675]: starting the
Postfix mail system
Dec  3 19:26:56 softlinksys postfix/master[5677]: daemon started -- version
3.4.13, configuration /etc/postfix
Dec  3 19:26:56 softlinksys systemd[1]: Started Postfix Mail Transport Agent
(instance -).
Dec  3 19:26:56 softlinksys systemd[1]: Starting Postfix Mail Transport
Agent...
Dec  3 19:26:56 softlinksys systemd[1]: Finished Postfix Mail Transport
Agent.
Dec  3 19:27:05 softlinksys systemd[1]: Started Dovecot IMAP/POP3 email
server.
Dec  3 19:27:05 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
starting up for imap, pop3, lmtp (core dumps disabled)
Dec  3 19:32:10 softlinksys dovecot: imap-login: Disconnected (auth failed,
3 attempts in 14 secs): user=, method=PLAIN, rip=67.8.3.170,
lip=194.163.45.150, TLS, session=

mail.log
Dec  3 19:26:55 softlinksys postfix/postfix-script[5508]: warning: symlink
leaves directory: /etc/postfix/./makedefs.out
Dec  3 19:26:56 softlinksys postfix/postfix-script[5675]: starting the
Postfix mail system
Dec  3 19:26:56 softlinksys postfix/master[5677]: daemon started -- version
3.4.13, configuration /etc/postfix
Dec  3 19:27:05 softlinksys dovecot: master: Dovecot v2.3.7.2 (3c910f64b)
starting up for imap, pop3, lmtp (core dumps disabled)
Dec  3 19:32:10 softlinksys dovecot: imap-login: Disconnected (auth failed,
3 attempts in 14 secs): user=, method=PLAIN, rip=67.8.3.170,
lip=194.163.45.150, TLS, session=

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Friday, December 3, 2021 1:35 PM
To: Postfix users 
Subject: Re: virtual mailbox domains??

post...@aecperformance.com:
> How can I debug/resolve this problem?

By sharing Postfix logs, in addition to Postfix configurations.

"email to X bounces" is not sufficient to determine *WHY* delivery is
failing.

Wietse



RE: virtual mailbox domains??

2021-12-03 Thread postfix
I tried to send  the logs and configs. 

I cleared the logs before I: started postfix & dovecot; attempted to send an
email; attempted to create a mail account in Thunderbird.

Then I retrieved syslog and mail.log.

 

For configs I did: postconf -n postconf Mf dovecot -n

 

The email bounced because it was too long.

I really need help and I'm finding it almost as difficult as finding the
answers to my problem.

 

What do I do now?

 

-Original Message-
From: owner-postfix-us...@postfix.org  On
Behalf Of Wietse Venema
Sent: Friday, December 3, 2021 1:35 PM
To: Postfix users 
Subject: Re: virtual mailbox domains??

 

 <mailto:post...@aecperformance.com> post...@aecperformance.com:

> How can I debug/resolve this problem?

 

By sharing Postfix logs, in addition to Postfix configurations.

 

"email to X bounces" is not sufficient to determine *WHY* delivery is
failing.

 

Wietse



Re: virtual mailbox domains??

2021-12-03 Thread Wietse Venema
post...@aecperformance.com:
> How can I debug/resolve this problem?

By sharing Postfix logs, in addition to Postfix configurations.

"email to X bounces" is not sufficient to determine *WHY*
delivery is failing.

Wietse


Re: Virtual mailbox domains vs relay domains

2017-11-12 Thread Viktor Dukhovni


> On Nov 12, 2017, at 6:15 AM, Tom Marcoen  wrote:
> 
>>> Losing recipient validation is NOT an advantage.  Either way,
>>> you need to have a table of valid recipients to avoid backscatter.
>> 
>> An alternative to a static table is dynamic recipient verification.
>> This uses a cache with proactive refresh.
>> http://www.postfix.org/ADDRESS_VERIFICATION_README.html
>> 
>>Wietse
> 
> That is exactly what Peer Heinlein also uses in his book but what I
> forgot to mention. I like this idea as it better isolates your DMZ
> server than when you have your DMZ server access your MySQL database.
> 
> So am I correct that the general population would recommend/prefer
> virtual mailbox domains over relay domains in this situation?

Real-time access to the full recipient table (be it via LDAP or SQL)
is more reliable/predictable than a partial cache.  Accessing and
caching the data via SMTP/LMTP is perhaps a lower attack surface
than the LDAP or MySQL protocols, but not by much.  My personal
preference in such a situation is to use LDAP or SQL.  With LDAP
you can spin-up a replica service that is colocated in the DMZ.

-- 
Viktor.



Re: Virtual mailbox domains vs relay domains

2017-11-12 Thread Wietse Venema
Tom Marcoen:
> So am I correct that the general population would recommend/prefer
> virtual mailbox domains over relay domains in this situation?

Yes, virtual_mailbox_domains is for final destinations 
including LMTP, relay_domains for forwarding to MTAs.

Peer may have written some of his text before Postfix 
virtual_mailbox_domains support was widely available.

Wietse


Re: Virtual mailbox domains vs relay domains

2017-11-12 Thread Tom Marcoen
On 10 November 2017 at 22:59, Viktor Dukhovni
 wrote:
>
>> On Nov 10, 2017, at 8:22 AM, Tom Marcoen  wrote:
>>
>> Last week however, I was reading a book on Dovecot written by Peer
>> Heinlein and he says that if you put a Postfix server in front of
>> Dovecot you should use 'relay_domains' for these domains, combined
>> with 'transport_maps'.
>
> This is not necessary.  LMTP is not SMTP, and you're not relaying
> the mail.  And even if you were, the destination is not a store-
> and-forward MTA, but a mailstore.  So it is not unreasonable to
> model the associated domain as a virtual mailbox domain.

This makes sense. I'm not really relaying the email so perhaps a
virtual mailbox domain makes more sense than a relay domain. Peer
Heinlein also wrote a (very thick) book on Postfix but alas it's only
in German so I will have to translate it before I can read it.

On 11 November 2017 at 14:32, Wietse Venema  wrote:
> Viktor Dukhovni:
>> > perhaps more importantly, what is the recommended way of sending
>> > emails from Postfix to Dovecot? The advantage of Peer's method is that
>> > you can place the Postfix server in a DMZ and it does not need access
>> > to your MySQL/... database for username information.
>>
>> Losing recipient validation is NOT an advantage.  Either way,
>> you need to have a table of valid recipients to avoid backscatter.
>
> An alternative to a static table is dynamic recipient verification.
> This uses a cache with proactive refresh.
> http://www.postfix.org/ADDRESS_VERIFICATION_README.html
>
> Wietse

That is exactly what Peer Heinlein also uses in his book but what I
forgot to mention. I like this idea as it better isolates your DMZ
server than when you have your DMZ server access your MySQL database.


So am I correct that the general population would recommend/prefer
virtual mailbox domains over relay domains in this situation?


Re: Virtual mailbox domains vs relay domains

2017-11-11 Thread Wietse Venema
Viktor Dukhovni:
> > perhaps more importantly, what is the recommended way of sending
> > emails from Postfix to Dovecot? The advantage of Peer's method is that
> > you can place the Postfix server in a DMZ and it does not need access
> > to your MySQL/... database for username information.
> 
> Losing recipient validation is NOT an advantage.  Either way,
> you need to have a table of valid recipients to avoid backscatter.

An alternative to a static table is dynamic recipient verification.
This uses a cache with proactive refresh.
http://www.postfix.org/ADDRESS_VERIFICATION_README.html

Wietse


Re: Virtual mailbox domains vs relay domains

2017-11-10 Thread Viktor Dukhovni


> On Nov 10, 2017, at 8:22 AM, Tom Marcoen  wrote:
> 
> Last week however, I was reading a book on Dovecot written by Peer
> Heinlein and he says that if you put a Postfix server in front of
> Dovecot you should use 'relay_domains' for these domains, combined
> with 'transport_maps'.

This is not necessary.  LMTP is not SMTP, and you're not relaying
the mail.  And even if you were, the destination is not a store-
and-forward MTA, but a mailstore.  So it is not unreasonable to
model the associated domain as a virtual mailbox domain.  You
can in that case put anything you want in the RHS of the virtual
mailbox table:

user@virtual.exampleVALID

the table is only used for recipient validation, not mailbox
location, which is determined by the mailstore.

> Is there any real difference in using one method or the other and,

That said, much the same works with relay_domains and
relay_recipient_maps.  Provided, with relay_domains, you
are careful with "parent_domain_matches_subdomains" and
avoid accidentally accepting mails for subdomains when
you only intend to receive email for the domain.

I'd be inclined to stick with virtual mailbox.

> perhaps more importantly, what is the recommended way of sending
> emails from Postfix to Dovecot? The advantage of Peer's method is that
> you can place the Postfix server in a DMZ and it does not need access
> to your MySQL/... database for username information.

Losing recipient validation is NOT an advantage.  Either way,
you need to have a table of valid recipients to avoid backscatter.

-- 
Viktor.