Автор Тема: Ubuntu и postfix  (Прочетена 1092 пъти)

gotha

  • Напреднали
  • *****
  • Публикации: 551
    • Профил
    • WWW
Ubuntu и postfix
« -: Jan 04, 2010, 17:49 »
Здравейте,
имам един ubuntu сървър от който ми трябва да пращам мейли. 
Опитвам се да настроя posftix, но нещо ми бяга по тъча.
Инсталирах си нормално пакета.
след това пуснах dpkg-reconfigure postfix и наблъсках настройките, които са препоръчани в ubuntu server guide-a
http://doc.ubuntu.com/ubuntu/serverguide/C/postfix.html
 
Опитвам се да изпращам мейли конзолно с mail така:
Цитат
cat testmail.txt | mail -s test-subject mymail@gmail.com
като testmail.txt ми е предварително приготвен текст за пращане. Писмото не се получава. На локалната ми поща (тая на сървъра) се получава мейл, който гласи, че писмото не може да се изпрати, но не знам дали този отговор идва от gmail или postfix-а го праща.
btw, пращането на писма до локален юзър (user@localhost) работи

/var/log/mail.log-а ми вади това:
Цитат
Jan  4 17:43:45 admin-server postfix/pickup[7084]: 75399A063C: uid=0 from=<root>
Jan  4 17:43:45 admin-server postfix/cleanup[7151]: 75399A063C: message-id=<20100104154345.75399A063C@admin-server>
Jan  4 17:43:45 admin-server postfix/qmgr[5248]: 75399A063C: from=<root@localhost>, size=360, nrcpt=1 (queue active)
Jan  4 17:43:45 admin-server postfix/error[7153]: 75399A063C: to=<тестовмейл@gmail.com>, relay=none, delay=0.48, delays=0.38/0.01/0/0.09, dsn=4.3.2, status=deferred (deferred transport)
Jan  4 17:44:00 admin-server postfix/smtpd[7155]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Jan  4 17:44:01 admin-server postfix/master[5246]: warning: process /usr/lib/postfix/smtpd pid 7155 exit status 1
Jan  4 17:44:01 admin-server postfix/master[5246]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling


/etc/posftix/master.cf файла ми изглежда така:

Цитат
smtp      inet  n       -       -       -       -       smtpd
#submission inet n       -       -       -       -       smtpd
#  -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       -       -       -       -       smtpd
#  -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       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
   -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       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=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# 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.
#
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}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

Имате ли идеи какво не е наред ?

Активен

blurmind

mbb

  • Напреднали
  • *****
  • Публикации: 28
    • Профил
Re: Ubuntu и postfix
« Отговор #1 -: Jan 04, 2010, 20:43 »
Възможно е да не е само това причината, но то си ти пише :
fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit

Вероятно нямаш нищо дефинирано за reject_unauth_destination.
Някъде в /etc/postfix/main.cf трябва да има ред, в който да присъства:
smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks, reject_unauth_destination

прочети за конфигурирането на main.cf и коригирай твоя файл.
Активен

Подобни теми
Заглавие Започната от Отговора Прегледи Последна публикация
Postfix
Настройка на програми
batgosho 1 1934 Последна публикация Feb 01, 2005, 11:13
от romeo_ninov
Проблем с Postfix
Настройка на програми
any 1 2083 Последна публикация Jan 09, 2006, 17:57
от any
Postfix
Настройка на програми
gminev 1 1943 Последна публикация Jan 12, 2006, 13:57
от
postfix неволи :-)
Хардуерни и софтуерни проблеми
any 0 1411 Последна публикация Jan 12, 2006, 22:18
от any
Postfix + postfix admin + courier + sasl
Хардуерни и софтуерни проблеми
TQ_ 1 3816 Последна публикация Apr 05, 2007, 12:44
от TQ_