Страница 1 из 1
Настройка Postfix
Добавлено: 02 окт 2004, 09:34
sutulo
В Mandrake 10 не хочет отправляться почта
/var/log/mail/info
2 09:32:32 732-1 postfix/cleanup[4966]: D9F3E6410: message-id=<20041002063231.D9F3E6410@732-1>
Oct 2 09:32:32 732-1 postfix/qmgr[4914]: D9F3E6410: from=<
sutulo@tut.by>, size=548, nrcpt=1 (queue active)
Oct 2 09:32:42 732-1 postfix/smtp[4972]: connect to tut.by[195.209.34.118]: Connection refused (port 25)
Oct 2 09:32:42 732-1 postfix/smtp[4972]: D9F3E6410: to=<
sutulo@tut.by>, relay=none, delay=11, status=deferred (connect to tut.by[195.209.34.118]: Connection refused)
в чем тут могут быть грабли?
P.S. Соединение с интернет через локальную сеть (может проблема тут? а не на моей машине)
Добавлено: 02 окт 2004, 18:13
Llama
sutulo, в настройках smarthost смени порт на 2525
PS: Белпак - придурки - закрыли уже давно 25 порт.
Добавлено: 05 окт 2004, 10:19
sutulo
про 25 порт я знаю, мне кажется дело не в этом но сейчас попробую...
Не нашел где править ни в main.cf ни в main.cf.defaults ничего про smarthost
Добавлено: 06 окт 2004, 09:50
zyxel
Код: Выделить всё
$ telnet 195.209.34.118 25
Trying 195.209.34.118...
telnet: Unable to connect to remote host: Connection refused
$ telnet 195.209.34.118 2525
Trying 195.209.34.118...
telnet: Unable to connect to remote host: Connection refused
$ host tut.by
tut.by A 195.209.34.118
$ host mail.tut.by
mail.tut.by A 195.209.41.194
$ telnet 195.209.41.194 25
Trying 195.209.41.194...
Connected to 195.209.41.194.
Escape character is '^]'.
220 TUT.BY ESMTP Server at speedy.tutby.com is ready to rock!
quit
221 tut.by TUT.BY SMTP Server at speedy.tutby.com is closing connection
Connection closed by foreign host.
$
Не туда коннектишься, надо на mail.tut.by
Добавлено: 06 окт 2004, 23:40
kae
в main.cf пишем:
relayhost=[mail.tut.by]:2525
и, возможно, усё... Однако есть у меня еще файлик transport, а в нем:
mail.tut.by smtp:mail.tut.by:2525
localhost local:
Не вполне уверен, что это нужно, возможно и нет, давно делал...
Добавлено: 07 окт 2004, 10:06
zyxel
Блин, народ, неужто так трудно почитать доки ??!!
http://www.postfix.org/STANDARD_CONFIGU ... tml#dialup
Код: Выделить всё
Route all outgoing mail to your network provider.
If your machine is disconnected most of the time, there isn't a lot of opportunity for Postfix to deliver mail to hard-to-reach corners of the Internet. It's better to give the mail to a machine that is connected all the time. In the example below, the [] prevents Postfix from trying to look up DNS MX records.
/etc/postfix/main.cf:
relayhost = [smtprelay.someprovider.com]
http://www.postfix.org/STANDARD_CONFIGU ... ml#fantasy
Код: Выделить всё
Postfix on hosts without a real hostname
This section is for hosts that don't have an Internet hostname. Typically these are systems that get a dynamic IP address via DHCP or via dialup. Postfix will let you send and receive mail just fine between accounts on a machine with a fantasy name. However, you cannot use a fantasy hostname in your email address when sending mail into the Internet, because no-one would be able to reply to your mail. In fact, more and more sites refuse mail from non-existent domain names.
The perfect solution would be for Postfix to do a mapping from local fantasy email addresses to valid Internet addresses when mail leaves the machine (similar to Sendmail's generics table). This is planned for the near future.
In the mean time, the solution with Postfix is to use valid Internet addresses where possible, and to let Postfix map valid Internet addresses to local fantasy addresses. With this, you can send mail to the Internet and to local fantasy addresses, including mail to local fantasy addresses that don't have a valid Internet address of their own.
The following example presents additional configuration. You need to combine this with basic configuration information as discussed the first half of this document.
1 /etc/postfix/main.cf:
2 myhostname = hostname.localdomain
3 mydomain = localdomain
4
5 canonical_maps = hash:/etc/postfix/canonical
6
7 virtual_alias_maps = hash:/etc/postfix/virtual
8
9 /etc/postfix/canonical:
10 your-login-name your-account@your-isp.com
11
12 /etc/postfix/virtual:
13 your-account@your-isp.com your-login-name
Translation:
* Lines 2-3: Substitute your fantasy hostname here. Do not use a domain name that is already in use by real organizations on the Internet. See RFC 2606 for examples of domain names that are guaranteed not to be owned by anyone.
* Lines 5, 9, 10: This provides the mapping from "your-login-name@hostname.localdomain" to "your-account@your-isp.com". This part is required.
* Lines 7, 12, 13: Deliver mail for "your-account@your-isp.com" locally, instead of sending it to the ISP. This part is not required but is convenient.
Добавлено: 15 окт 2004, 10:19
sutulo
после изменений...
/var/log/mail
Oct 15 10:15:47 732-1 postfix/pickup[2615]: 5054A69E2: uid=0 from=<
sutulo@tut.by>
Oct 15 10:15:47 732-1 postfix/cleanup[2768]: 5054A69E2: message-id=<20041015071547.5054A69E2>
Oct 15 10:15:48 732-1 postfix/qmgr[2616]: 5054A69E2: from=<
sutulo@tut.by>, size=556, nrcpt=1 (queue active)
Oct 15 10:15:53 732-1 postfix/smtp[2775]: connect to mail.tut.by[195.209.41.194]: Connection refused (port 2525)
Oct 15 10:15:53 732-1 postfix/smtp[2775]: 5054A69E2: to=<
sutulo@tut.by>, relay=none, delay=6, status=deferred (connect to mail.tut.by[195.209.41.194]: Connection refused)
Добавлено: 15 окт 2004, 10:23
zyxel
Добавлено: 15 окт 2004, 10:48
sutulo
Trying 195.209.41.194...
telnet: connect to address 195.209.41.194: Connection refused
telnet: Unable to connect to remote host: Connection refused
Добавлено: 15 окт 2004, 11:25
sutulo
Как мне кажется почта не отправляется из-за того, что я нахожусь за прокси-сервером. Наверное на нем изменили настройки. Я попробовал соединиться с internet по беспарольному доступу - почта на tut.by - отправляется.
С другими серверами затык. В логах следующее:
Oct 15 10:57:44 732-1 postfix/cleanup[3077]: 7C91C694F: message-id=<20041015075744.7C91C694F@>
Oct 15 10:57:44 732-1 postfix/qmgr[3055]: 7C91C694F: from=<
sutulo@tut.by>, size=561, nrcpt=1 (queue active)
Oct 15 10:58:25 732-1 postfix/smtp[3083]: connect to smtp1.ua.fm[195.248.176.166]: Connection timed out (port 25)
Oct 15 10:58:25 732-1 postfix/smtp[3083]: 7C91C694F: to=<
godless@ua.fm>, relay=none, delay=41, status=deferred (connect to smtp1.ua.fm[195.248.176.166]: Connection timed out)
Но тут возможно не идет из за того что postfix ломится через 25 порт.
Надо наверное попробовать соединиться не по беспарольке.....
???
P.S. Заметил что не пингуются внешние серверы....
ping forum.linux.by
PING forum.linux.by (217.21.50.1) 56(84) bytes of data.
--- forum.linux.by ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 2999ms
Добавлено: 15 окт 2004, 12:15
zyxel
это не прокси виноват, а firewall
обращайся к своему админу сети.
Добавлено: 15 окт 2004, 12:54
sutulo
Похоже проблема в корпоративном firewall.
Если подключаюсь к internet через провайдера айчына а не по БЕСПАРОЛЬКЕ то postfix нормально отправляет письма напрямую куда надо.
P.S. To ALL - Спасибо за участие, тема себя исчерпала и наверное ее можно прикрыть.