On 1/28/2017 6:10 PM, Wietse Venema wrote:
> Jeremy T. Bouse:
> [ Charset windows-1252 converted... ]
>> On 1/28/2017 12:16 PM, Wietse Venema wrote:
>>> Sorry about that, I should have written 'import_environment'. That
>>> setting controls what Postfix uses internally, including in its
>>> pgsql client.
>>>
>>>     Wietse
>>     Okay so am I doing something wrong here... I've got the following in
>> my main.cf:
>>
>> import_environment = PGPASSFILE=/etc/postfix/pgsql/.pgpass
>> virtual_alias_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_alias.cf,
>>     proxy:pgsql:/etc/postfix/pgsql/virtual_alias_domainaliases.cf
>> virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox.cf,
>>     proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_domainaliases.cf
>> virtual_mailbox_domains = proxy:pgsql:/etc/postfix/pgsql/virtual_domains.cf
>>
>>     With the /etc/postfix/pgsql/*.cf files all following the format:
>>
>> user = DB_USER
>> password = DB_PASSWD
>> hosts = psqldb.undergrid.net
>> dbname = postfixadmin
>> query = <SQL QUERY>
> You can set the access permissions ON /etc/postfix/pgsql/virtual_alias.cf,
> /etc/postfix/pgsql/virtual_alias_domainaliases.cf, etc. There is
> no need for those to be world-readable.
>
>       Wietse
root@mail02:/etc/postfix# ls -ld /etc/postfix/pgsql
drwxr-xr-x 2 postfix root 4096 Jan 28 23:08 /etc/postfix/pgsql

root@mail02:/etc/postfix# ls -la /etc/postfix/pgsql
total 36
drwxr-xr-x 2 postfix root 4096 Jan 28 23:08 .
drwxr-xr-x 4 root    root 4096 Jan 28 16:26 ..
-rw------- 1 postfix root   65 Jan 28 22:39 .pgpass
-rw------- 1 postfix root  199 Jan 28 22:27 relay_domains.cf
-rw------- 1 postfix root  245 Jan 28 23:08 virtual_alias.cf
-rw------- 1 postfix root  274 Jan 28 22:27 virtual_alias_domainaliases.cf
-rw------- 1 postfix root  200 Jan 28 22:27 virtual_domains.cf
-rw------- 1 postfix root  254 Jan 28 22:56 virtual_mailbox.cf
-rw------- 1 postfix root  286 Jan 28 22:27 virtual_mailbox_domainaliases.cf

    The permissions and ownership shouldn't be an issue... postfix owns
them and has read-write access to everything. As I said with the `user`
and `password` config keywords in the .cf files everything works. It
only fails when I try to comment them out and have Postfix use the
.pgpass file.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to