Postfix mail relay thru Google account

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Postfix mail relay thru Google account

Postby mackowiakp » Jul 5th, '13, 20:56

Is someone able to configure the Postfix on M3, so that all emails from your own computer was relay through Gmail account? Any HOWTO for M3?
The web is a lot of descriptions like this:
https://blog.wormly.com/2008/11/05/rela ... p-postfix/
But the directory structure for CA and PKI is different than, for example, in Mandriva. As a result of this command, type "openssl xxx" often ends with errors.
I was able to create your own CA, by manually copying the files in the appropriate directories, but when I try to sign the certificate by such created CA it ends with error too:
Code: Select all
Certificate is to be certified until Jul  5 17:58:49 2014 GMT (365 days)
Sign the certificate? [y/n]:y
failed to update database
TXT_DB error number 2

And I do not know what to do.

Differences in location of ssl relayted files, make it impossible to use WEBMIN, included in the main repository. Webmin does not recognize the existence of openssl even though it is physically installed. It also prevents the use Webmin to configure the VPN server.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 6th, '13, 10:02

Not getting into the certificates' issue,

check the following configuration in your /etc/postfix/main.cf:

Code: Select all
relayhost = [smtp.google.com]:587
relay_transport = relay
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = /etc/postfix/saslauth



then in /etc/postfix/saslauth

Code: Select all
smtp.google.com     GMAIL_USER_ACCOUNT:GMAIL_PASSWORD


Now

Code: Select all
# postmap /etc/postfix/saslauth


then according to other configurations you might have, check /etc/postfix/master.cf
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 6th, '13, 10:56

And thats all necessary to relay all emails from all users on particular computer via goggle account?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 6th, '13, 19:03

linuxero wrote:Not getting into the certificates' issue,

check the following configuration in your /etc/postfix/main.cf:

Code: Select all
relayhost = [smtp.google.com]:587
relay_transport = relay
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = /etc/postfix/saslauth



then in /etc/postfix/saslauth

Code: Select all
smtp.google.com     GMAIL_USER_ACCOUNT:GMAIL_PASSWORD


Now

Code: Select all
# postmap /etc/postfix/saslauth


then according to other configurations you might have, check /etc/postfix/master.cf


Such configuration does not work for me, even postfix not try to connect to smtp.gmail.com.

I want to non local emails to be relayed via my goggle account and local to deliverd to local user.
My configuration is:
/etc/postfix/transport
Code: Select all
*            smtp:[smtp.gmail.com]:587


/etc/postfix/main.cf
Code: Select all
[root@media postfix]# cat main.cf
# This file contains only the parameters changed from a default install
# see /etc/postfix/main.cf.dist for a commented, fuller version of this file.
transport_maps = hash:/etc/postfix/transport
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_mechanism_filter = plain, login
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes


/etc/postfix/sasl_passwd
Code: Select all
[smtp.google.com]:587    myuser@gmail.com:mypass


And after I run:
Code: Select all
# postmap transport && postmap sasl_passwd
systemctl restart postfix.service


So now my server try to connect to gmail MX (without success but not deliver email localy

So logs from journalctl
Code: Select all
Jul 06 18:38:01 media postfix/pickup[31431]: 30714960F8: uid=0 from=<root>
Jul 06 18:38:01 media postfix/cleanup[31641]: 30714960F8: message-id=<20130706163801.30714960F8@media.localdomain>
Jul 06 18:38:01 media postfix/qmgr[31432]: 30714960F8: from=<root@media.localdomain>, size=436, nrcpt=1 (queue active)
Jul 06 18:38:01 media postfix/smtp[31643]: connect to smtp.gmail.com[2a00:1450:4008:c01::6c]:587: Network is unreachable
Jul 06 18:38:01 media postfix/smtp[31643]: 30714960F8: to=<mackowiakp23@gmail.com>, relay=smtp.gmail.com[173.194.69.108]:587, delay=0.7, delays=0.03/0.04/0.55/0.07, ...M command))
Jul 06 18:38:02 media postfix/cleanup[31641]: 0B85D960F9: message-id=<20130706163802.0B85D960F9@media.localdomain>
Jul 06 18:38:02 media postfix/qmgr[31432]: 0B85D960F9: from=<>, size=2555, nrcpt=1 (queue active)
Jul 06 18:38:02 media postfix/bounce[31646]: 30714960F8: sender non-delivery notification: 0B85D960F9
Jul 06 18:38:02 media postfix/qmgr[31432]: 30714960F8: removed
Jul 06 18:38:02 media postfix/smtp[31643]: connect to smtp.gmail.com[2a00:1450:4008:c01::6d]:587: Network is unreachable
Jul 06 18:38:02 media postfix/smtp[31643]: 0B85D960F9: to=<root@media.localdomain>, relay=smtp.gmail.com[173.194.69.109]:587, delay=0.59, delays=0.02/0.01/0.51/0.06,...M command))
Jul 06 18:38:02 media postfix/qmgr[31432]: 0B85D960F9: removed
Jul 06 18:38:40 media auth[31778]: pam_tcb(dovecot:auth): Authentication passed for media from (uid=0)
Jul 06 18:38:40 media dovecot[1442]: pop3-login: Login: user=<media>, method=PLAIN, rip=192.168.0.2, lip=192.168.0.7, mpid=31779, secured, session=<VZaXcdrgpADAqAAC>
Jul 06 18:38:40 media dovecot[1442]: pop3(media): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Jul 06 18:38:58 media postfix/pickup[31431]: CD15D960F8: uid=0 from=<root>
Jul 06 18:38:58 media postfix/cleanup[31641]: CD15D960F8: message-id=<20130706163858.CD15D960F8@media.localdomain>
Jul 06 18:38:58 media postfix/qmgr[31432]: CD15D960F8: from=<root@media.localdomain>, size=430, nrcpt=1 (queue active)
Jul 06 18:38:59 media postfix/smtp[31643]: CD15D960F8: to=<mackowiakp@op.pl>, relay=smtp.gmail.com[173.194.69.108]:587, delay=0.63, delays=0.02/0/0.54/0.06, dsn=5.5....M command))
Jul 06 18:38:59 media postfix/cleanup[31641]: BAB0E960F9: message-id=<20130706163859.BAB0E960F9@media.localdomain>
Jul 06 18:38:59 media postfix/qmgr[31432]: BAB0E960F9: from=<>, size=2541, nrcpt=1 (queue active)
Jul 06 18:38:59 media postfix/bounce[31646]: CD15D960F8: sender non-delivery notification: BAB0E960F9
Jul 06 18:38:59 media postfix/qmgr[31432]: CD15D960F8: removed
Jul 06 18:39:00 media postfix/smtp[31643]: BAB0E960F9: to=<root@media.localdomain>, relay=smtp.gmail.com[173.194.69.109]:587, delay=0.66, delays=0.02/0.01/0.56/0.07,...M command))
Jul 06 18:39:00 media postfix/qmgr[31432]: BAB0E960F9: removed


Any help to make it working?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 7th, '13, 17:46

can you cat /etc/postfix/master.cf

The configuration I showed above works fine for me, now you need to check the whole runtime configuration. What do your logs say?
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 7th, '13, 18:02

Yes sure

Code: Select all
[root@media postfix]# cat master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# The script postfix-chroot.sh can be used to set up a Postfix chroot
# environment on your Mageia System.
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp    inet    n       -       y       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
#submission inet n       -       n       -       -       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
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o syslog_name=postfix/smtps
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup  fifo    n       -       y       60      1       pickup
  -o content_filter=
  -o receive_override_options=
cleanup unix    n       -       y       -       0       cleanup
qmgr    fifo    n       -       y       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr  unix    -       -       y       1000?   1       tlsmgr
rewrite unix    -       -       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 smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq   unix    n       -       y       -       -       showq
error   unix    -       -       y       -       -       error
retry   unix    -       -       y       -       -       error
discard unix    -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp    unix    -       -       y       -       -       lmtp
anvil   unix    -       -       y       -       1       anvil
scache  unix    -       -       y       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Please See the Postfix CYRUS_README file for details
# deliver interface (deprecated), to use this also use
# postconf -e cyrus-deliver_destination_recipient_limit=1
cyrus-deliver     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# for default cyrus socket placement
cyrus     unix  -       n       n       -       -       lmtp
#  -o lmtp_cache_connection=yes
#
# if you configure cyrus socket in the chroot jail
cyrus-chroot     unix  -       -       y       -       -       lmtp
#  -o lmtp_cache_connection=yes
#
# for lmtp to cyrus via tcp
cyrus-inet      unix    -       -       y       -       -       lmtp
  -o lmtp_sasl_auth_enable=yes
  -o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
  -o lmtp_sasl_security_options=noanonymous
#  -o lmtp_cache_connection=yes
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
# These are not distributed with Mageia
#
#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/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
#
##### START OF CONTENT FILTER CUSTOMIZATIONS #####
# Please see the Postfix FILTER_README for details.
# These sample entries expect your content filter to
# listen on port 10025 and to inject mail back into
# postfix on port 10026.
#
# to enable such content filter run the command
#    postconf -e content_filter=smtp-filter:127.0.0.1:10025
#    postconf -e smtp-filter_destination_concurrency_limit=2
# or
#    postconf -e content_filter=lmtp-filter:127.0.0.1:10025
#    postconf -e lmtp-filter_destination_concurrency_limit=2
# and the command
#    postconf -e receive_override_options=no_address_mappings
#
# adjust the value of ?mtp-filter_destination_concurrency_limit
# to match the maximum number of process your content filter
# will spawn.
#
127.0.0.1:10026 inet    n       -       y       -       -       smtpd
  -o content_filter=
  -o smtpd_restriction_classes=
  -o smtpd_client_restrictions=permit_mynetworks,reject
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_end_of_data_restrictions=
  -o smtpd_etrn_restrictions=
  -o smtpd_data_restrictions=
  -o smtpd_delay_reject=no
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8
  -o smtpd_authorized_xforward_hosts=127.0.0.0/8
  -o strict_rfc821_envelopes=yes
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
#
lmtp-filter     unix    -       -       y       -       -       lmtp
  -o lmtp_data_done_timeout=1200
  -o lmtp_send_xforward_command=yes
  -o max_use=20
#  -o lmtp_cache_connection=no
#
smtp-filter     unix    -       -       y       -       -       smtp
  -o smtp_data_done_timeout=1200
  -o smtp_send_xforward_command=yes
  -o max_use=20
#
##### END OF CONTENT FILTER CUSTOMIZATIONS #####
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 7th, '13, 18:46

Try using this modified version of your master.cf

Code: Select all
[root@media postfix]# cat master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# The script postfix-chroot.sh can be used to set up a Postfix chroot
# environment on your Mageia System.
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp    inet    n       -       y       -       -       smtpd
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy
submission inet n       -       n       -       -       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
  -o milter_macro_daemon_name=ORIGINATING
smtps     inet  n       -       n       -       -       smtpd
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
#628       inet  n       -       n       -       -       qmqpd
pickup  fifo    n       -       y       60      1       pickup
  -o content_filter=
  -o receive_override_options=
cleanup unix    n       -       y       -       0       cleanup
qmgr    fifo    n       -       y       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr  unix    -       -       y       1000?   1       tlsmgr
rewrite unix    -       -       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 smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq   unix    n       -       y       -       -       showq
error   unix    -       -       y       -       -       error
retry   unix    -       -       y       -       -       error
discard unix    -       -       y       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp    unix    -       -       y       -       -       lmtp
anvil   unix    -       -       y       -       1       anvil
scache  unix    -       -       y       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=nobody argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Please See the Postfix CYRUS_README file for details
# deliver interface (deprecated), to use this also use
# postconf -e cyrus-deliver_destination_recipient_limit=1
cyrus-deliver     unix  -       n       n       -       -       pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# for default cyrus socket placement
cyrus     unix  -       n       n       -       -       lmtp
#  -o lmtp_cache_connection=yes
#
# if you configure cyrus socket in the chroot jail
cyrus-chroot     unix  -       -       y       -       -       lmtp
#  -o lmtp_cache_connection=yes
#
# for lmtp to cyrus via tcp
cyrus-inet      unix    -       -       y       -       -       lmtp
  -o lmtp_sasl_auth_enable=yes
  -o lmtp_sasl_password_maps=hash:/etc/postfix/cyrus_lmtp_sasl_pass
  -o lmtp_sasl_security_options=noanonymous
#  -o lmtp_cache_connection=yes
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
# These are not distributed with Mageia
#
#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/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
#
##### START OF CONTENT FILTER CUSTOMIZATIONS #####
# Please see the Postfix FILTER_README for details.
# These sample entries expect your content filter to
# listen on port 10025 and to inject mail back into
# postfix on port 10026.
#
# to enable such content filter run the command
#    postconf -e content_filter=smtp-filter:127.0.0.1:10025
#    postconf -e smtp-filter_destination_concurrency_limit=2
# or
#    postconf -e content_filter=lmtp-filter:127.0.0.1:10025
#    postconf -e lmtp-filter_destination_concurrency_limit=2
# and the command
#    postconf -e receive_override_options=no_address_mappings
#
# adjust the value of ?mtp-filter_destination_concurrency_limit
# to match the maximum number of process your content filter
# will spawn.
#
127.0.0.1:10026 inet    n       -       y       -       -       smtpd
  -o content_filter=
  -o smtpd_restriction_classes=
  -o smtpd_client_restrictions=permit_mynetworks,reject
  -o smtpd_helo_restrictions=
  -o smtpd_sender_restrictions=
  -o smtpd_end_of_data_restrictions=
  -o smtpd_etrn_restrictions=
  -o smtpd_data_restrictions=
  -o smtpd_delay_reject=no
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8
  -o smtpd_authorized_xforward_hosts=127.0.0.0/8
  -o strict_rfc821_envelopes=yes
  -o smtpd_error_sleep_time=0
  -o smtpd_soft_error_limit=1001
  -o smtpd_hard_error_limit=1000
  -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
#
lmtp-filter     unix    -       -       y       -       -       lmtp
  -o lmtp_data_done_timeout=1200
  -o lmtp_send_xforward_command=yes
  -o max_use=20
#  -o lmtp_cache_connection=no
#
smtp-filter     unix    -       -       y       -       -       smtp
  -o smtp_data_done_timeout=1200
  -o smtp_send_xforward_command=yes
  -o max_use=20
#
##### END OF CONTENT FILTER CUSTOMIZATIONS #####
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 7th, '13, 19:35

OK, I use Your master.cf and try to send mail:

mail my.mail@xxxxx.pl
Subject: test
test
.
EOT
postdrop: warning: unable to look up public/pickup: No such file or directory

Port 587 not active on server, postfix is:
Code: Select all
postfix.service              loaded active running
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 7th, '13, 19:56

Do you have sendmail running?
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 7th, '13, 20:07

I used ssmtp, ad it worked properly. But I physically removed it bu : urpme ssmtp
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 7th, '13, 20:20

make sure only postfix is running and try this:
Code: Select all
#  mkfifo /var/spool/postfix/public/pickup
# systemctl restart postfix.service
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 7th, '13, 20:44

So You have:
Code: Select all
[root@media postfix]#  mkfifo /var/spool/postfix/public/pickup
[root@media postfix]# systemctl restart postfix.service
[root@media postfix]#


And one line from systemctl:

Code: Select all
postfix.service              loaded active running


So, looks its running.
Now - no error after sending test mail, but no delivery
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 8th, '13, 10:37

Why don't you show the logs..!
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 8th, '13, 20:35

Yep, i wanted to attach output from journalctl -f but no information about postfix activity. In other configurations I try, it was avaliable from journalctl -f.
So any other logs would be useful for You?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 9th, '13, 12:01

I think the logs should be in /var/log/mail/*
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 9th, '13, 22:09

So You have:

Code: Select all
[root@media mail]# cat warnings.log
Jul  9 21:55:11 mediatomb postfix/postdrop[1646]: warning: unable to look up public/pickup: No such file or directory
Jul  9 21:57:54 mediatomb postfix/master[2242]: warning: /etc/postfix/master.cf: logical line must not start with whitespace: "    [root@media postfix]# cat ..."
Jul  9 21:58:52 mediatomb postfix/postdrop[2037]: warning: unable to look up public/pickup: No such file or directory
Jul  9 22:03:56 mediatomb postfix/postdrop[3135]: warning: unable to look up public/pickup: No such file or directory
Jul  9 22:07:05 mediatomb postfix/master[3598]: warning: /etc/postfix/master.cf: logical line must not start with whitespace: "    [root@media postfix]# cat ..."


Code: Select all
[root@media mail]# cat info.log
Jul  9 21:57:47 mediatomb dovecot: master: Dovecot v2.1.15 starting up (core dumps disabled)
Jul  9 21:57:53 mediatomb postfix/postfix-script[2241]: starting the Postfix mail system
Jul  9 21:57:54 mediatomb postfix/master[2242]: daemon started -- version 2.9.6, configuration /etc/postfix
Jul  9 22:00:12 mediatomb dovecot: pop3-login: Login: user=<media>, method=PLAIN, rip=192.168.0.2, lip=192.168.0.7, mpid=2581, secured, session=<17HhmxnhEwDAqAAC>
Jul  9 22:00:12 mediatomb dovecot: pop3(media): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Jul  9 22:07:04 mediatomb postfix/postfix-script[3458]: stopping the Postfix mail system
Jul  9 22:07:04 mediatomb postfix/master[2242]: terminating on signal 15
Jul  9 22:07:05 mediatomb postfix/postfix-script[3597]: starting the Postfix mail system
Jul  9 22:07:05 mediatomb postfix/master[3598]: daemon started -- version 2.9.6, configuration /etc/postfix


Code: Select all
[root@media mail]# cat errors.log
[root@media mail]#
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Postfix mail relay thru Google account

Postby linuxero » Jul 10th, '13, 12:18

Are you sure no other MTA/MDA is running?
linuxero
 
Posts: 345
Joined: Oct 7th, '11, 15:50

Re: Postfix mail relay thru Google account

Postby mackowiakp » Jul 10th, '13, 17:34

I used ssmtp, but it is removed -> urpme ssmtp
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron