Difference between revisions of "Talk:Postfix"

From ArchWiki
Jump to navigation Jump to search
 
(36 intermediate revisions by 11 users not shown)
Line 1: Line 1:
Hi! Could you please update the article, since pam is now obsolete? I think people use gamin now instead.
+
==Using without MySQL==
20120308 - kopatops
+
Good article, but it doesn't even speak about one important fact: it's possible to have postfix without mysql.
----
+
 
 +
Mysql is quite heavy for what is required by postfix, and I want to manage users separately in an LDAP database. I'll see if it's possible to do it and perhaps update the wiki.
 +
 
 +
{{Unsigned|7 March 2012‎|Geoffroy}}
 +
 
 +
:Yes, it is definitely possible and quite achievable to use LDAP with postfix. If I find time I would like to contribute some wiki info about this very subject. I have some of this info on my own website, too. [[User:Cirkit|Cirkit]] ([[User talk:Cirkit|talk]]) 01:17, 17 September 2017 (UTC)
 +
 
 +
== Postfixadmin Cfg & Dovecot Select Statement ==
 +
 
 +
Hello,
 +
 
 +
i used this tutorial to install dovecot, postfix and postfixadmin. It worked but the value down here is not working in the whole context of this tutorial.
 +
 
 +
 
 +
If -> $CONF['domain_in_mailbox'] = 'YES'; <- is set to YES then we get in the sql table mailbox the value for maildir : -> domain.org/user@domain.org/<-.
 +
 
 +
But the SQL Query from the Virtual user mail tutorial uses this query: user_query = SELECT '/home/vmail/%d/%n' as home, 'maildir:/home/vmail/%d/%n' as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
 +
 
 +
'maildir:/home/vmail/%d/%n' - means append the user name without the domain.
 +
 
 +
this causes that we will have two directories created by postfix - in /home/vmail/domain.org/bob and /home/vmail/domain.org/bob@domain.org
 +
 
 +
I tried some things and changed the SQL String from %d/%n to %d/%u but at the end i decided it's the easiest part not to save the domainname in the mailbox name.
 +
 
 +
So the solution should be to use $CONF['domain_in_mailbox'] = 'NO';
  
Good article! I updated it though to correct errors in the instructions I ran into.
+
regards marco
  
20090309 - fukawi2
+
(hope this is helful)
Excellent. Spent 3 days fiddling around with courier-mta... Spent a couple of hours tweaking this to use PostgreSQL for auth and works perfectly :)
 
----
 
Everything is ok  but pacman -Sy postfix-mysql do not anything. There is no such package.
 
  
:Install postfix:
+
== spamassassin and dovecot ==
  pacman -Si postfix
 
  Replaces      : postfix-mysql  postfix-pgsql
 
:I updated the article.--[[User:Gog|Gog]] 06:34, 22 October 2009 (EDT)
 
  
----
+
The sections about spamassassin and dovecot do not explain, what concept gets implemented there. Some conceptual explanation would be much appreciated. [[User:Fordprefect|Fordprefect]] ([[User talk:Fordprefect|talk]]) 19:26, 14 April 2016 (UTC)
Any chance the MySQL portion could be made to be more explicit?
 
In particular, how to create postfixuser and what permissions to give it.
 
This is the SQL I had to use that wasn't in this page:
 
<pre>
 
CREATE DATABASE postfix;
 
USE postfix;
 
  
...create tables...
+
:Do you have more details on what you want explained exactly? Dovecot can call SA in different ways and this wiki covers the most useful ones. My own favorite is via LMTP + sieve as it's the fastest and most scalable. See also https://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol.
 +
:--[[User:Zang|Zang]] ([[User talk:Zang|talk]]) 23:38, 10 June 2016 (UTC)
  
CREATE USER 'postfixuser' IDENTIFIED BY 'XXXXXXXXXX';
+
::i miss some introduction about the concept behind spamassassin. that might be one sentence like "Spamassassin is a rule based mail rating system working as dedicated service.". that would make it easier to know what to expect from that section (whether it solves my problem or not). as it is now, one depends on guessing based on the name only, and it is kind of implicated everyone knows what spamassassin does (and how, conceptually).
GRANT SELECT, INSERT, UPDATE, DELETE ON domains TO postfixuser;
+
::i am not sure, i explained it well… i'll try again if you wish…? [[User:Fordprefect|Fordprefect]] ([[User talk:Fordprefect|talk]]) 11:09, 11 June 2016 (UTC)
GRANT SELECT, INSERT, UPDATE, DELETE ON forwardings TO postfixuser;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON users TO postfixuser;
 
</pre>
 
  
I'd add it myself, but I'm not too savvy on databases
+
== Spamassassin - sa.service ==
and I'd like someone else to look over the permissions I used before recommending them in the wiki page.
+
 
[[User:Buce|Buce]] 16:49, 6 April 2011 (EDT)
+
In the text, it says:
:I tried to expand the section with your code: it's up to each user to understand, possibly modify, and take responsibility for using it. -- [[User:Kynikos|Kynikos]] 04:01, 7 April 2011 (EDT)
+
 
----
+
Now you can start and enable sa.service.
Good article, but it doesn't even speak about one important fact: it's possible to have postfix without mysql.
+
 
 +
I'm not confident enough to edit the entry - but i guess it should say "sa.timer" right?
 +
 
 +
{{Unsigned|2016-09-23 13:50:20‎|Matschi}}
 +
 
 +
:No, I think it was right. The names were very confusing however.
 +
:Please have a look at the section and see if it is clearer now I've made some changes. [[User:Lonaowna|Lonaowna]] ([[User talk:Lonaowna|talk]]) 12:53, 23 September 2016 (UTC)
 +
 
 +
::Thanks for the quick reply and reworking the naming. :) I took another look. As
 +
 
 +
# systemctl enable spamassassin-update.service
 +
 
 +
:: gives
 +
 
 +
<blockquote><poem>
 +
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
 +
settings in the [Install] section, and DefaultInstance for template units).
 +
This means they are not meant to be enabled using systemctl.
 +
Possible reasons for having this kind of units are:
 +
1) A unit may be statically enabled by being symlinked from another unit's
 +
  .wants/ or .requires/ directory.
 +
2) A unit's purpose may be to act as a helper for some other unit which has
 +
  a requirement dependency on it.
 +
3) A unit may be started when needed via activation (socket, path, timer,
 +
  D-Bus, udev, scripted systemctl call, ...).
 +
4) In case of template units, the unit is meant to be enabled with some
 +
  instance name specified.</poem></blockquote>
 +
 
 +
::and timer activation works,
 +
 
 +
# systemctl enable spamassassin-update.timer
 +
Created symlink /etc/systemd/system/timers.target.wants/spamassassin-update.timer → /etc/systemd/system/spamassassin-update.timer.
 +
 
 +
::I think that enabling the timer instead of the executed service file is the right thing to do. Agreed? [[User:Matschi|Matschi]] ([[User talk:Matschi|talk]]) 13:15, 23 September 2016 (UTC)
 +
 
 +
== IPV6 Configutation Information. ==
 +
 
 +
include appending ipv6 to inet_protocols in main.cf as mentioned here, [https://bbs.archlinux.org/viewtopic.php?id=206180], to address not being able to connect on Android client with most providers.
  
Mysql is quite heavy for what is required by postfix, and I want to manage users separately in an LDAP database. I'll see if it's possible to do it and perhaps update the wiki.
+
{{unsigned|18:47, 20 December 2017‎|MeZee}}

Latest revision as of 19:10, 20 December 2017

Using without MySQL

Good article, but it doesn't even speak about one important fact: it's possible to have postfix without mysql.

Mysql is quite heavy for what is required by postfix, and I want to manage users separately in an LDAP database. I'll see if it's possible to do it and perhaps update the wiki.

—This unsigned comment is by Geoffroy (talk) 7 March 2012‎. Please sign your posts with ~~~~!

Yes, it is definitely possible and quite achievable to use LDAP with postfix. If I find time I would like to contribute some wiki info about this very subject. I have some of this info on my own website, too. Cirkit (talk) 01:17, 17 September 2017 (UTC)

Postfixadmin Cfg & Dovecot Select Statement

Hello,

i used this tutorial to install dovecot, postfix and postfixadmin. It worked but the value down here is not working in the whole context of this tutorial.


If -> $CONF['domain_in_mailbox'] = 'YES'; <- is set to YES then we get in the sql table mailbox the value for maildir : -> domain.org/user@domain.org/<-.

But the SQL Query from the Virtual user mail tutorial uses this query: user_query = SELECT '/home/vmail/%d/%n' as home, 'maildir:/home/vmail/%d/%n' as mail, 5000 AS uid, 5000 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'

'maildir:/home/vmail/%d/%n' - means append the user name without the domain.

this causes that we will have two directories created by postfix - in /home/vmail/domain.org/bob and /home/vmail/domain.org/bob@domain.org

I tried some things and changed the SQL String from %d/%n to %d/%u but at the end i decided it's the easiest part not to save the domainname in the mailbox name.

So the solution should be to use $CONF['domain_in_mailbox'] = 'NO';

regards marco

(hope this is helful)

spamassassin and dovecot

The sections about spamassassin and dovecot do not explain, what concept gets implemented there. Some conceptual explanation would be much appreciated. Fordprefect (talk) 19:26, 14 April 2016 (UTC)

Do you have more details on what you want explained exactly? Dovecot can call SA in different ways and this wiki covers the most useful ones. My own favorite is via LMTP + sieve as it's the fastest and most scalable. See also https://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol.
--Zang (talk) 23:38, 10 June 2016 (UTC)
i miss some introduction about the concept behind spamassassin. that might be one sentence like "Spamassassin is a rule based mail rating system working as dedicated service.". that would make it easier to know what to expect from that section (whether it solves my problem or not). as it is now, one depends on guessing based on the name only, and it is kind of implicated everyone knows what spamassassin does (and how, conceptually).
i am not sure, i explained it well… i'll try again if you wish…? Fordprefect (talk) 11:09, 11 June 2016 (UTC)

Spamassassin - sa.service

In the text, it says:

Now you can start and enable sa.service.

I'm not confident enough to edit the entry - but i guess it should say "sa.timer" right?

—This unsigned comment is by Matschi (talk) 2016-09-23 13:50:20‎. Please sign your posts with ~~~~!

No, I think it was right. The names were very confusing however.
Please have a look at the section and see if it is clearer now I've made some changes. Lonaowna (talk) 12:53, 23 September 2016 (UTC)
Thanks for the quick reply and reworking the naming. :) I took another look. As
# systemctl enable spamassassin-update.service
gives

<poem>

The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some

instance name specified.</poem>

and timer activation works,
# systemctl enable spamassassin-update.timer
Created symlink /etc/systemd/system/timers.target.wants/spamassassin-update.timer → /etc/systemd/system/spamassassin-update.timer.
I think that enabling the timer instead of the executed service file is the right thing to do. Agreed? Matschi (talk) 13:15, 23 September 2016 (UTC)

IPV6 Configutation Information.

include appending ipv6 to inet_protocols in main.cf as mentioned here, [1], to address not being able to connect on Android client with most providers.

—This unsigned comment is by MeZee (talk) 18:47, 20 December 2017‎. Please sign your posts with ~~~~!