Re: Are large alias files a problem?

2021-12-06 Thread Viktor Dukhovni
> On 6 Dec 2021, at 6:05 pm, John Levine  wrote:
> 
> This is the IETF's forwarding addresses for works that are or were
> (hence the large number) in progress. Each entry has as many targets
> as the draft has authors so it's rarely more than 2 or 3.

You will not face any meaningful limits with this.  Use of CDB will
be more efficient in memory cost, because unlike Berkeley DB the
database is read-only and does not allocate a page pool.  Just
mmaps the (shared) file.

I'd use CDB for this.  I think the inputs will not change frequently
enough or be anywhere near sufficiently many to make the CDB map
creation time to be something to worry about.

CDB has a very stable disk format and API, I trust it more than
either Berkeley DB or LMDB for mostly static data.

-- 
Viktor.



Re: postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Togan Muftuoglu
> "DS" == Doug Sampson  writes:

>> Doug Sampson: > I've opened an account with Spamhaus to use their Data
>> Query > Service. I've reconfigured the main.cf to incorporate the necessary
>> > adjustments.
>> >
>> > One thing I've noticed that when the maps (postscreen_dnsbl_reply_map > &
>> rbl_reply_maps) as recommended by Spamhaus are implemented, the > results
>> of these DQS tests aren't published in the mail log. > Consequently the
>> spamrep_today report is missing such information.
>> 
>> What results? What are DQS test

DS> Spamhaus provides enhanced real-time blocklists. See
DS> https://www.spamhaus.com/product/data-query-service/ for more information.

And Interestingly Abusix also

https://abusix.com/free-trial/ for more information

Both Abusix and Spamhaus support is also good for a free service


I wanted to try baracudacentral first but they can't send the registration
confirmation email as it is rejected by their own DMARC rule. 




RE: postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Doug Sampson
> Doug Sampson:
> > I've opened an account with Spamhaus to use their Data Query
> > Service. I've reconfigured the main.cf to incorporate the necessary
> > adjustments.
> >
> > One thing I've noticed that when the maps (postscreen_dnsbl_reply_map
> > & rbl_reply_maps) as recommended by Spamhaus are implemented, the
> > results of these DQS tests aren't published in the mail log.
> > Consequently the spamrep_today report is missing such information.
> 
> What results?
> What are DQS test

Spamhaus provides enhanced real-time blocklists. See 
https://www.spamhaus.com/product/data-query-service/ for more information.

~D



RE: postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Doug Sampson
> I have followed their manual and it works.
> 
>  postfix/dnsblog[6907]: addr 116.255.29.67 listed by domain MY-API-
> KEY.zen.dq.spamhaus.net as 127.0.0.3
>  postfix/dnsblog[6907]: addr 116.255.29.67 listed by domain MY-API-
> KEY.zen.dq.spamhaus.net as 127.0.0.4
>  postfix/dnsblog[6909]: addr 116.255.29.67 listed by domain
> hostkarma.junkemailfilter.com as 127.0.0.3
>  postfix/dnsblog[6909]: addr 116.255.29.67 listed by domain
> hostkarma.junkemailfilter.com as 127.0.1.1
>  postfix/postscreen[6901]: DNSBL rank 7 for [116.255.29.67]:25749
>  postfix/postscreen[6901]: DISCONNECT [116.255.29.67]:25749
> 
> 
> The API key is only printed to the logs replies go as zen.spamhaus.org
[> ] 


Alas, it seems I spoke too soon. I am seeing the zen.dq.spamhaus.net entries 
with my API key embedded. Sorry for the noise!

~D


RE: virtual mailbox domains??

2021-12-06 Thread postfix
I finally figured out why I couldn't send emails to 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   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??

 

  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: Are large alias files a problem?

2021-12-06 Thread John Levine
It appears that Viktor Dukhovni  said:
>> For an application I'm working on, we need to set up about 50,000 forwarding 
>> addresses.

>You should be able to use an LMDB, Berkeley DB or CDB database with
>millions of entries.
>
>Though I don't think you're asking about 1-to-very-many forwarding,
>if you have 50k *RHS* (output) addresses for a single input address,
>then there are some limits you may have to tweak.  The defaults are:

This is the IETF's forwarding addresses for works that are or were
(hence the large number) in progress. Each entry has as many targets
as the draft has authors so it's rarely more than 2 or 3.

R's,
John


Re: postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Togan Muftuoglu
> "Doug" == Doug Sampson  writes:

Doug> I've opened an account with Spamhaus to use their Data Query Service.
Doug> I've reconfigured the main.cf to incorporate the necessary adjustments.
Doug> One thing I've noticed that when the maps (postscreen_dnsbl_reply_map &
Doug> rbl_reply_maps) as recommended by Spamhaus are implemented, the results
Doug> of these DQS tests aren't published in the mail log. Consequently the
Doug> spamrep_today report is missing such information.

Doug> Is there a way to incorporate these maps and publish the test results in
Doug> the mail log?

I have followed their manual and it works.

 postfix/dnsblog[6907]: addr 116.255.29.67 listed by domain 
MY-API-KEY.zen.dq.spamhaus.net as 127.0.0.3
 postfix/dnsblog[6907]: addr 116.255.29.67 listed by domain 
MY-API-KEY.zen.dq.spamhaus.net as 127.0.0.4
 postfix/dnsblog[6909]: addr 116.255.29.67 listed by domain 
hostkarma.junkemailfilter.com as 127.0.0.3
 postfix/dnsblog[6909]: addr 116.255.29.67 listed by domain 
hostkarma.junkemailfilter.com as 127.0.1.1
 postfix/postscreen[6901]: DNSBL rank 7 for [116.255.29.67]:25749
 postfix/postscreen[6901]: DISCONNECT [116.255.29.67]:25749


The API key is only printed to the logs replies go as zen.spamhaus.org


Re: postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Wietse Venema
Doug Sampson:
> I've opened an account with Spamhaus to use their Data Query
> Service. I've reconfigured the main.cf to incorporate the necessary
> adjustments.
>
> One thing I've noticed that when the maps (postscreen_dnsbl_reply_map
> & rbl_reply_maps) as recommended by Spamhaus are implemented, the
> results of these DQS tests aren't published in the mail log.
> Consequently the spamrep_today report is missing such information.

What results? 
What are DQS tests? 

Postfix logs DNSXL rejects with the (mapped) name of the reputation
service.

Wietse

> Is there a way to incorporate these maps and publish the test
> results in the mail log?
>
> ~Doug
>
>
>


Re: 2nd newbie question: outgoing reply-to

2021-12-06 Thread Wietse Venema
Herndon Elliott:
> With yalls help I have postfix working - Thanks!
> 
> But I need to set ALL outgoing mail to be from a very specific
> username@domain in order to get the receiving SMTP relay to accept it.  I
> can do this on each message with
> 
>mail -r username@domain 

See http://www.postfix.org/SOHO_README.html#fantasy, the example
for fantasy domains.

Wietse

> But this means redoing mail commands all over in scripts.  Can I force
> every outgoing SMTP message (regardless of which user within my system
> actually sent it) to have the same from/reply-to address?  How?  All of the
> examples in the manual still make the reply-to username@mydomain, but I
> have to make it a fixed unchanging value.
> 
> Herndon Elliott
> "If the truth shall kill them, let them die."  -- Ayn Rand
> ?   "molon labe"


2nd newbie question: outgoing reply-to

2021-12-06 Thread Herndon Elliott
With yalls help I have postfix working - Thanks!

But I need to set ALL outgoing mail to be from a very specific
username@domain in order to get the receiving SMTP relay to accept it.  I
can do this on each message with

   mail -r username@domain 

But this means redoing mail commands all over in scripts.  Can I force
every outgoing SMTP message (regardless of which user within my system
actually sent it) to have the same from/reply-to address?  How?  All of the
examples in the manual still make the reply-to username@mydomain, but I
have to make it a fixed unchanging value.

Herndon Elliott
"If the truth shall kill them, let them die."  -- Ayn Rand
ΜΟΛΩΝ ΛΑΒΕ  "molon labe"


postscreen_dnsbl_reply_map & rbl_reply_maps

2021-12-06 Thread Doug Sampson
I've opened an account with Spamhaus to use their Data Query Service. I've 
reconfigured the main.cf to incorporate the necessary adjustments.

One thing I've noticed that when the maps (postscreen_dnsbl_reply_map & 
rbl_reply_maps) as recommended by Spamhaus are implemented, the results of 
these DQS tests aren't published in the mail log. Consequently the 
spamrep_today report is missing such information.

Is there a way to incorporate these maps and publish the test results in the 
mail log?

~Doug




Re: Newbie question - main.cf.proto

2021-12-06 Thread Benny Pedersen

On 2021-12-06 21:25, Scott Kitterman wrote:


When you installed the package you selected "No configuration", so
it's not particularly surprising you have no configuration.  Use
dpkg-reconfigure postfix and pick a different option for configuration
and you will have a main.cf.  Internet Site is probably the most
useful for a starting place.


postfix runs fine if it have a main.cf complete empty, it will then just 
use all default settings from postconf-d as all default, no need imho to 
add non default lines if default is ok


i dont understand why so many makes mistakes on this :/


Re: Are large alias files a problem?

2021-12-06 Thread Benny Pedersen

On 2021-12-06 20:29, John Levine wrote:

For an application I'm working on, we need to set up about 50,000
forwarding addresses.

If we just put them into a hash or btree lookup table, would that be a
problem?  It doesn't seem like a very big database.


is it one key with 5 value results

or 5 key with 1 value results each ?

be more specific to get more specific results


Re: Newbie question - main.cf.proto

2021-12-06 Thread Viktor Dukhovni
On Mon, Dec 06, 2021 at 03:18:11PM -0500, Herndon Elliott wrote:

> I am just getting started with trying to install postifx and get it running
> on a single Ubuntu 18.04 server.  The documentation talks at length about
> changes to be made in "/etc/postfix/main.cf" file, but there is no such
> file in my install.  I have a main.cf.proto, but no main.cf  The only
> mention I can find the documentation of these files is " multi-instance
> template files "
> 
> So am I supposed to rename (or better yet, copy) main.cf.proto as main.cf
> before making the changes to it??
> 
> The installation instructions certainly could be a bit more explicit about
> this for a beginner

The lack of a main.cf file is a choice made by the O/S distribution.
When installing the package, you must have opted for "no configuration",
rather than a specific configuration (local only, inbound server, ...).

The upstream "make install", when building Postfix from source does
create a main.cf file.

So your issue is with Ubuntu/Debian, not Postfix.

That said, yes, create a "main.cf" file that meets your needs.  You can
start with an empty file, or a copy of "main.cf.proto".

Personally, I always start with empty files, but I'm already quite
familiar with the options I want to set, and prefer to avoid the clutter
of all the comments, that for me obscure the big picture.  For you the
comment blocks for each of the common settings may be more helpful.

-- 
Viktor.


Re: Newbie question - main.cf.proto

2021-12-06 Thread Scott Kitterman



On December 6, 2021 8:18:11 PM UTC, Herndon Elliott  
wrote:
>I am just getting started with trying to install postifx and get it running
>on a single Ubuntu 18.04 server.  The documentation talks at length about
>changes to be made in "/etc/postfix/main.cf" file, but there is no such
>file in my install.  I have a main.cf.proto, but no main.cf  The only
>mention I can find the documentation of these files is " multi-instance
>template files "
>
>So am I supposed to rename (or better yet, copy) main.cf.proto as main.cf
>before making the changes to it??
>
>The installation instructions certainly could be a bit more explicit about
>this for a beginner

When you installed the package you selected "No configuration", so it's not 
particularly surprising you have no configuration.  Use dpkg-reconfigure 
postfix and pick a different option for configuration and you will have a 
main.cf.  Internet Site is probably the most useful for a starting place.

Scott K


Newbie question - main.cf.proto

2021-12-06 Thread Herndon Elliott
I am just getting started with trying to install postifx and get it running
on a single Ubuntu 18.04 server.  The documentation talks at length about
changes to be made in "/etc/postfix/main.cf" file, but there is no such
file in my install.  I have a main.cf.proto, but no main.cf  The only
mention I can find the documentation of these files is " multi-instance
template files "

So am I supposed to rename (or better yet, copy) main.cf.proto as main.cf
before making the changes to it??

The installation instructions certainly could be a bit more explicit about
this for a beginner

Thanks in advance.

Herndon Elliott
"If the truth shall kill them, let them die."  -- Ayn Rand
ΜΟΛΩΝ ΛΑΒΕ  "molon labe"


Re: Are large alias files a problem?

2021-12-06 Thread Viktor Dukhovni
On Mon, Dec 06, 2021 at 02:29:18PM -0500, John Levine wrote:

> For an application I'm working on, we need to set up about 50,000 forwarding 
> addresses.

I take this to be 50k *LHS* addresses.  That is 50k input addresses each
get forwarded to corresponding output addresses.

> If we just put them into a hash or btree lookup table, would that be a 
> problem?  It doesn't
> seem like a very big database.

You should be able to use an LMDB, Berkeley DB or CDB database with
millions of entries.

Though I don't think you're asking about 1-to-very-many forwarding,
if you have 50k *RHS* (output) addresses for a single input address,
then there are some limits you may have to tweak.  The defaults are:

mailbox_size_limit = 5120
message_size_limit = 1024
virtual_alias_expansion_limit = 1000
virtual_alias_recursion_limit = 1000

IIRC the message_size_limit also bounds the size of the queue file,
which also holds the recipient list, so with 50k recipients, you could
get close to the message size limit with just the recipient addresses.

The mailbox size limit must equal or exceed the message size limit.

-- 
Viktor.


Re: Are large alias files a problem?

2021-12-06 Thread Wietse Venema
John Levine:
> For an application I'm working on, we need to set up about 50,000
> forwarding addresses.
>
> If we just put them into a hash or btree lookup table, would that be a 
> problem?  It doesn't
> seem like a very big database.

It should work with Berkeley DB (hash, btree) and LMDB. The days
of (N)DBM page size limits are long gone.

With Berkeley DB you may want to use the "safe update" procedure 
http://www.postfix.org/DATABASE_README.html#safe_db . This is not
needed with LMDB, because they never overwrite data.

Wietse


Are large alias files a problem?

2021-12-06 Thread John Levine
For an application I'm working on, we need to set up about 50,000 forwarding 
addresses.

If we just put them into a hash or btree lookup table, would that be a problem? 
 It doesn't
seem like a very big database.

R's,
John



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 
>  . 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: FW: virtual mailbox domains??

2021-12-06 Thread Wietse Venema
post...@aecperformance.com:
> I attempted to send an email to smok...@sizzelicks.com. It bounced.

Wietse:
> 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.

post...@aecperformance.com:
> I'm not sure what you mean here.

LOGS from the machine that runs Postfix, for your attempt to send
mail to smok...@sizzelicks.com.

Here's what is looged when I send email to smok...@sizzelicks.com:

Dec  6 12:31:33 spike postfix/smtp[22522]: 4J79T171qVzJrP1: 
to=, 
relay=mail.sizzelicks.com[2a02:4780:10:e096::1]:25, delay=15, 
delays=0.13/0.012/15/0.16, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 
ECEDAA06C5)

You can the corresponding logs at your end by searching for "ECEDAA06C5".

Your mail client reports:

> 'smok...@sizzelicks.com' on 12/6/2021 11:22 AM
>  Server error: '550 No Such User Here"'

That does not look like a Postfix response. What system is returning these
results to you?

Wietse


FW: virtual mailbox domains??

2021-12-06 Thread postfix
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.

I'm not sure what you mean here.

This is what I get back:
Your message did not reach some or all of the intended recipients.

 

  Subject: Testing VPS Mail from client

  Sent:  12/6/2021 11:22 AM

 

The following recipient(s) cannot be reached:

 

  'smok...@sizzelicks.com' on 12/6/2021 11:22 AM

Server error: '550 No Such User Here"'

 

Internet headers is empty. I can't see headers in Outlook.

I checked mail.log again after attempting to send to
 smok...@sizzelicks.com

My laptop IP isn't anywhere in the log. I'm getting hammered by spammers
though. It shows that.

 

> 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.

I'm not sure how to check or fix routing problems.

Here is my firewall:

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)



 

 

Wietse



Re: Setting up virtual mail users

2021-12-06 Thread Tyler Montney
I really gotta remember to reply all. Here's what was between Bobby and I:


Here:
Home-less Users
Having a home directory for users is highly recommended. At a minimum, the
Pigeonhole Sieve plugin requires a home directory to work. See Home
Directories for Virtual Users for more reasons why it’s a good idea, and
how to give Dovecot a home directory even if you don’t have a “real home
directory”.

If you really don’t want to set any home directory, you can use something
like:

mail_location = maildir:/home/%u/Maildir

https://doc.dovecot.org/configuration_manual/mail_location/
Hide quoted text

On Sat, Dec 4, 2021 at 12:34 PM Tyler Montney 
wrote:
> reading in the documentation that user home folders are highly recommended

Who (Dovecot or Postfix) and where?

As for my configuration, I use /srv/vmail. Just personal preference.
Assuming we're talking about using /home/%u, I wouldn't do that because I
expect shell users to be there. (It might even go against convention for
Linux.) If I'm wrong, someone else correct me as I'm interested to know.

On Sat, Dec 4, 2021 at 10:30 AM bobby 
wrote:
I was not planning on using Postfix admin.
I would like to go the Virtual Users route... but I was reading in the
documentation that user home folders, even for virtual, are highly
recommended.  Is this true?

On Sat, Dec 4, 2021 at 11:14 AM Tyler Montney 
wrote:
I'm confused, are you looking to support virtual users *and* local users,
or is this about "only being available via Postfix admin"?


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."