Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
serwer poczty, postfix
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt
View previous topic :: View next topic  
Author Message
professor1234
n00b
n00b


Joined: 27 Mar 2005
Posts: 62
Location: Kraków, Poland

PostPosted: Sat Sep 17, 2011 12:09 pm    Post subject: serwer poczty, postfix Reply with quote

Witam,

Co by tego linuxa nie zapomnieć wynajduję sobie zajęcia regularnie :) A na poważnie zainwestowałem w domenę, podpiąłem do niej moje publiczne IP, strona na Apache'u nawet ładnie działa i teraz chciałbym sobie stworzyć konta pocztowe na tej domenie.
Czyli mam domenę np.: zzzxxx.pl podpiąłem ją do mojego adresu xxx.xxx.xxx.xxx
Mój komputer jest w sieci z inną domeną np.: aaabbb.pl
Jak wysyłam maila np.: przez mutta wyświetla mi się że mail przyszedł od root@aaabbb.pl (co jest logiczne)a chciałbym żeby było że przyszedł od root@zzzxxx.pl

Jest to zapewne proste i banalne, ale jeszcze jakoś nie do końca rozumiem jak to działa...
Wydaje mi się że powinien ustawić:
Code:
ssmtp.conf
/postfix/main.cf
/mutt/.muttrc


Jakbyś ktoś mógł oświecić będę wdzięczny.

pzdr,


Last edited by professor1234 on Sun Mar 04, 2012 7:14 pm; edited 2 times in total
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Sat Sep 17, 2011 3:15 pm    Post subject: Reply with quote

nie masz ssmtp jak masz postfiksa, oba zabewniaja sendmail (i sie wzajemnie blokuja), gdzie ssmtp to tylko forwarder.
Back to top
View user's profile Send private message
professor1234
n00b
n00b


Joined: 27 Mar 2005
Posts: 62
Location: Kraków, Poland

PostPosted: Sat Sep 17, 2011 7:02 pm    Post subject: Reply with quote

Ok,

zmyliło mnie że w /etc/ssmtp plik konfiguracji został mimo że to odinstalowałem.
Obecnie mam:
- postfix'a
- mutta

Jak to teraz pokonfigurować ??

pzdr,

Nie wiem jeszcze czemu, ale jak klikam odpowiedz przenosi mnie do głównego forum...


Last edited by professor1234 on Sun Sep 18, 2011 10:22 am; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Sat Sep 17, 2011 7:43 pm    Post subject: Reply with quote

Mutt to klient poczty, wiec to zupelnie inna bajka (mozesz go uzywac do maildirow chociaz by). Postfix nie jest jakos mega trudny do konfiguracji, generalnie, jakbys chcial go do 'lokalnych userow' to nie wymaga prawie zadnej konfiguracji, proponuje zagooglowac za tym jak zrobic na postfiksie wirtualne konta mail. Zagoogluj za 'gentoo-wiki postfix' i czytaj.
Back to top
View user's profile Send private message
professor1234
n00b
n00b


Joined: 27 Mar 2005
Posts: 62
Location: Kraków, Poland

PostPosted: Sun Sep 18, 2011 12:07 pm    Post subject: Reply with quote

Code:


Last edited by professor1234 on Sun Mar 04, 2012 7:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
professor1234
n00b
n00b


Joined: 27 Mar 2005
Posts: 62
Location: Kraków, Poland

PostPosted: Mon Jan 16, 2012 8:50 pm    Post subject: Reply with quote

OK. Jednak postfix nie działa jak należy, dalej nie odbiera poczty:

Remote host said: 550 5.1.1 <admin@zzzxxx.pl>: Recipient address rejected: User unknown in local recipient table
Giving up on ip.ip.ip.ip


Poniżej jeszcze raz log z ./main.cf
Code:

soft_bounce = no

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix

#default_privs = nobody

myhostname = doradus.zzzxxx.pl
#myhostname = virtual.domain.tld

mydomain = zzzxxx.pl

# SENDING MAIL

#myorigin = $myhostname
myorigin = $mydomain
#myorigin=

# RECEIVING MAIL

inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost

#proxy_interfaces =
#proxy_interfaces = 1.2.3.4

mydestination = $myhostname, localhost.$mydomain, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#       mail.$mydomain, www.$mydomain, ftp.$mydomain

# REJECTING MAIL FOR UNKNOWN LOCAL USERS

#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =

unknown_local_recipient_reject_code = 550

# TRUST AND RELAY CONTROL

#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host

mynetworks = 83.175.181.144/28, 127.0.0.0/8, 192.168.1.0/24
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

#relay_domains = $mydestination
# INTERNET OR INTRANET

#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN RELAY USERS

#relay_recipient_maps = hash:/etc/postfix/relay_recipients

# INPUT RATE CONTROL

#in_flow_delay = 1s

# ADDRESS REWRITING

# username->Firstname.Lastname mapping.

# ADDRESS REDIRECTION (VIRTUAL DOMAIN)

# ALIAS DATABASE

#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

# ADDRESS EXTENSIONS (e.g., user+foo)

#recipient_delimiter = +

# DELIVERY TO MAILBOX
# The default mailbox file is /var/spool/mail/user or /var/mail/user.  Specify

home_mailbox = Maildir/

#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"

#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus

#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =

#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local

# JUNK MAIL CONTROLS

#header_checks = regexp:/etc/postfix/header_checks

# FAST ETRN SERVICE

#fast_flush_domains = $relay_domains

# SHOW SOFTWARE VERSION OR NOT

#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

# PARALLEL DELIVERY TO THE SAME DESTINATION

local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 20

# DEBUGGING CONTROL

debug_peer_level = 2

#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain

#debugger_command =
#        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
#        ddd $daemon_directory/$process_name $process_id & sleep 5

# If you can't use X, use this to capture the call stack when a
# daemon crashes. The result is in a file in the configuration
# directory, and is named after the process name and the process ID.
#
# debugger_command =
#       PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
#       echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
#       >$config_directory/$process_name.$process_id.log & sleep 5

# debugger_command =
#       PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
#       -dmS $process_name gdb $daemon_directory/$process_name
#       $process_id & sleep 1

# INSTALL-TIME CONFIGURATION INFORMATION

sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop

# html_directory: The location of the Postfix HTML documentation.
html_directory = /usr/share/doc/postfix-2.8.4/html

# manpage_directory: The location of the Postfix on-line manual pages.
manpage_directory = /usr/share/man
sample_directory = /etc/postfix

readme_directory = /usr/share/doc/postfix-2.8.4/readme
mailbox_command =

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =

smtpd_recipient_restrictions =
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_unauth_destination

smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_key_file = /etc/postfix/newkey.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_loglevel = 3
# manpage_directory: The location of the Postfix on-line manual pages.
manpage_directory = /usr/share/man
sample_directory = /etc/postfix

readme_directory = /usr/share/doc/postfix-2.8.4/readme
mailbox_command =

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =

smtpd_recipient_restrictions =
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_unauth_destination

smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_key_file = /etc/postfix/newkey.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom



Połączenie telnetem z portem 25 działa:
Code:

220 doradus.zzzxxx.pl ESMTP Postfix
EHLO zzzxxx.pl
250-doradus.zzzxxx.pl
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN


Połączenie telnetem z portem 110 działa:
Code:

+OK Hello there.


Połączenie telnetem z portem 143 działa:
Code:

* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.


A postfix jak nie odbierał poczty tak nie odbiera jej dalej...
Regułki firewalla dla poczty które mam to:
Code:

# postfix/SSL/IMAP/IMAPS/POP3/POP3S
iptables -A INPUT -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 143 -j ACCEPT
iptables -A INPUT -p tcp --dport 993 -j ACCEPT
iptables -A INPUT -p tcp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp --dport 995 -j ACCEPT


Plik aliasów /etc/mail/aliases:
Code:

...
# Well-known aliases -- these should be filled in!
root: admin@zzzxxx.pl
user12: Piotrek@zzzxxx.pl


Mógłby mnie ktoś oświecić co jeszcze może nie grać ??

Pozdrawiam
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum