Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting Postfix etc...
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Wed Jun 27, 2007 6:44 pm    Post subject: Setting Postfix etc... Reply with quote

I have been trying for like a week or two to set up Postfix, normally just giving up. I run lighttpd and I followed http://www.gentoo.org/doc/en/virt-mail-howto.xml a lot, I just skipped the Apache stuff and instead of using rimap I used pam (rimap wouldent work). I just made a ebuild to get postfixadmin without apache, it works fine but I can't get users or anything, I make mailboxes and they don't work on my squirrelmail, I just can't seem to get postfix set up, I haven't had my main email address (the one off my domain) in a while and I can't retrieve many passwords. I also made a DNS A for mail.madgizmo.com and made a DNS MX record for madgizmo.com. If anyone can help, or if anyone knows what I should show, log wise, please respond! Thanks.
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Jun 27, 2007 7:44 pm    Post subject: Reply with quote

The Gentoo virtual how-to is incompatible with PostfixAdmin for a number of reason the largest being the completely different database schemas used by each system. I'd scrap what you have now and start over using a how-to from the gentoo-wiki.org based on PostfixAdmin.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Wed Jun 27, 2007 9:41 pm    Post subject: Reply with quote

i am not really looking for postfixadmin to work or not, it just looked like an easier alternative, even without it i couldent get anything to work because there was no way for me to add mailboxs etc...
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Thu Jun 28, 2007 4:44 pm    Post subject: Reply with quote

I will try to help, I have a working setup.

Can you post the /etc/postfix/main.cf and /etc/postfix/master.cf files?

Also, what happens when you telnet to port 25 on your machine? Here's an example of how to do it if you don't already know.

Code:
telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 hostname.domain.com ESMTP Postfix
helo domain.com
250 hostname.domain.com
mail from: fefeh@domain.com
250 2.1.0 Ok
rcpt to: fefeh@domain.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
aksjdfkalsdkfj
alksdjfkalsdjf
.
250 2.0.0 Ok: queued as 4782E63CE5
quit
221 2.0.0 Bye
Connection closed by foreign host.

Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Thu Jun 28, 2007 6:19 pm    Post subject: Reply with quote

thank you fefeh!

well to start it off when i telnet 25, its really short all i get is

Code:
208 ~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.


it just ends after that
for main.cf (it has a lot of comments etc... so i just copied out what was uncommented.)
Code:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = mail.madgizmo.com
mydomain = madgizmo.com
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 208.100.2.87/24, 127.0.0.0/8
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf

local_transport = local
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname

virtual_transport = virtual
virtual_mailbox_domains =
        madgizmo.com

virtual_minimum_uid = 1000
virtual_gid_maps = static:$vmail-gid
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
virtual_uid_maps = static:$vmail-uid
virtual_mailbox_base = /
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 20
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = /usr/share/doc/postfix-2.3.6/html
manpage_directory = /usr/share/man
sample_directory = /etc/postfix
readme_directory = /usr/share/doc/postfix-2.3.6/readme
home_mailbox = .maildir/

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_key_file = /etc/postfix/newreq.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


for mail_owner = postfix i am not sure if i should change that to vmail or something?

here is master.cf
Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       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/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix  -       n       n       -       -       pipe
  flags=R user=cyrus argv=/usr/lib/cyrus/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus     unix  -       n       n       -       -       pipe
  flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${extension} ${user}
# Cyrus with "virtdomains: yes"
# Also specify in main.cf: virtual_transport = virt-cyrus
virt-cyrus     unix  -       n       n       -       -       pipe
  flags=hu user=cyrus argv=/usr/lib/cyrus/deliver -e -r ${sender} -m ${recipient} ${user}
#
# 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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Thu Jun 28, 2007 6:33 pm    Post subject: Reply with quote

rgk wrote:
thank you fefeh!

well to start it off when i telnet 25, its really short all i get is

Code:
208 ~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.


it just ends after that


Are you sure postfix is running? Do you see any errors in the log when you try to start it manually?

Code:

/etc/init.d/postfix start


Your configuration files are not too different from mine. I don't use mysql so that is the main difference.
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Thu Jun 28, 2007 6:48 pm    Post subject: Reply with quote

yeah postfix is running i jut did

Code:
208 ~ # /etc/init.d/postfix restart
 * Stopping postfix ...                                                   [ ok ]
 * Starting postfix ...                                                   [ ok ]


this may be a stupid question but i can't even find the postfix logs, i am looking in /var/log =/
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
elgato319
Guru
Guru


Joined: 15 Sep 2005
Posts: 546

PostPosted: Thu Jun 28, 2007 6:54 pm    Post subject: Reply with quote

if you have syslog-ng installed all log messages go to /var/log/messages
to seperate everything mail related to another logfile you need to specify it in /etc/syslog-ng/syslog-ng.conf

do you have some kind of firewall installed on this machine?

"netstat -l -n" should contain something like:
Code:

tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Thu Jun 28, 2007 6:57 pm    Post subject: Reply with quote

rgk wrote:
yeah postfix is running i jut did

Code:
208 ~ # /etc/init.d/postfix restart
 * Stopping postfix ...                                                   [ ok ]
 * Starting postfix ...                                                   [ ok ]


this may be a stupid question but i can't even find the postfix logs, i am looking in /var/log =/


Mine are in /var/log/maillog but that depends on your configuration in syslog

Do this:
Code:

netstat -an | grep LISTEN


make sure that close to the top of that, you see this or something similar on port 25.

Code:

tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Thu Jun 28, 2007 7:03 pm    Post subject: Reply with quote

it does contain tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
there is no firewall from what i understand installed on my server so i am not sure

it should be working but it just isn't, so i am stumped

i also have no /var/maillog is there any way i would active it? i have mysql, lighttpd but not maillog.
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Thu Jun 28, 2007 7:08 pm    Post subject: Reply with quote

rgk wrote:

i also have no /var/maillog is there any way i would active it? i have mysql, lighttpd but not maillog.


What about /var/log/messages?
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Thu Jun 28, 2007 7:23 pm    Post subject: Reply with quote

ah yes i do have /var/log/messages

its has tons of logs though, tons of people trying to hack into my ssh =P
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Thu Jun 28, 2007 8:16 pm    Post subject: Reply with quote

This is often that newaliases command has not been run.
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Thu Jun 28, 2007 9:08 pm    Post subject: Reply with quote

well one thing i had to change was in

Code:
Code Listing 4.2: Starting sasl

# nano -w /etc/sasl2/smtpd.conf
mech_list: PLAIN LOGIN
pwcheck_method: saslauthd
# nano -w /etc/conf.d/saslauthd
SASLAUTHD_OPTS="${SASLAUTH_MECH} -a rimap -r"
SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -O localhost"
# /etc/init.d/saslauthd start


for that part i changed rimap to pam (the default in the file) because i couldn't get it to run with rimap, could that be causing any problems?
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Thu Jun 28, 2007 9:32 pm    Post subject: Reply with quote

rgk wrote:

for that part i changed rimap to pam (the default in the file) because i couldn't get it to run with rimap, could that be causing any problems?


I don't think so because you are not getting to the authentication point I don't think.

Let's try taking out the mysql alias file right now and try it with the hash file, just in case. In your /etc/postfix/main.cf replace your alias_maps with the following. I didn't see an alias_database in your file, maybe that's an issue? We can always change it back later.

Code:

alias_maps = hash:/etc/mail/aliases
alias_database = hash:/etc/mail/aliases


Make sure that file exists, if not I can post mine.

Then do:
Code:

newaliases
/etc/init.d/postfix stop
/etc/init.d/postfix start


Then try the telnet localhost 25 again.
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Fri Jun 29, 2007 12:03 am    Post subject: Reply with quote

well it seemed to fix a little but telnet is still the same =/

Code:

208 ~ # nano /etc/postfix/main.cf
208 ~ # newaliases
postalias: fatal: unsupported map type: mysql
208 ~ # nano /etc/postfix/main.cf
208 ~ # cd /etc/mail
208 mail # ls
aliases  aliases.db
208 mail # nano aliases
208 mail # newaliases
208 mail # /etc/init.d/postfix start
 * WARNING:  postfix has already been started.
208 mail # /etc/init.d/postfix restart
 * Stopping postfix ...                                                                     [ ok ]
 * Starting postfix ...                                                                     [ ok ]
208 mail # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


should i change everything to hash files and skip mysql? ( i am sure the database is up i am using it for a few sites etc... so i doubt thats a problem but anything to get it up.)
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Fri Jun 29, 2007 1:03 am    Post subject: Reply with quote

You know what, try the newaliases command again just to be sure it recognized the right file after you edited it.

Then do the stop/start or the postfix reload again to see if it made any difference.

This is strange. I keep hoping someone smarter than me will come and bail both of us out :lol: Oh magic919... :wink:
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Jun 29, 2007 4:56 am    Post subject: Reply with quote

I wouldn't say I qualify as any smarter.

Here's what I'd do first. Sort out the logging. Postfix is great at telling you what is or isn't going on. But you need to be able to see it.

Then you'll probably be able to get this sorted.

If the OP is using syslog-ng then a quick tweak will liberate separate logs. Meanwhile a grep postfix /var/log/messages will prove it does log to the syslog and show the errors.
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Sat Jun 30, 2007 1:15 am    Post subject: Reply with quote

thanks for everyones help

i changed mynetworks = 208.100.2.87/24, 127.0.0.0/8 to mynetworks = localhost/24, 127.0.0.0/8

it seemed to fix a few things but it still has problems, now when i telnet it is looking for more then just a connection, here are the logs and the telnet.

Code:

Jun 29 19:48:55 208 postfix/trivial-rewrite[27528]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:48:55 208 postfix/trivial-rewrite[27528]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:48:56 208 postfix/qmgr[27516]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:48:56 208 postfix/qmgr[27516]: warning: problem talking to service rewrite: Success
Jun 29 19:48:56 208 postfix/master[27512]: warning: process /usr/lib/postfix/trivial-rewrite pid 27528 exit status 1
Jun 29 19:48:56 208 postfix/master[27512]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Jun 29 19:49:56 208 postfix/trivial-rewrite[27531]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:49:56 208 postfix/trivial-rewrite[27531]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:49:57 208 postfix/qmgr[27516]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:49:57 208 postfix/qmgr[27516]: warning: problem talking to service rewrite: Success
Jun 29 19:49:57 208 postfix/master[27512]: warning: process /usr/lib/postfix/trivial-rewrite pid 27531 exit status 1
Jun 29 19:49:57 208 postfix/master[27512]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Jun 29 19:50:57 208 postfix/trivial-rewrite[27547]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:50:57 208 postfix/trivial-rewrite[27547]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:50:58 208 postfix/qmgr[27516]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:50:58 208 postfix/qmgr[27516]: warning: problem talking to service rewrite: Success
Jun 29 19:50:58 208 postfix/master[27512]: warning: process /usr/lib/postfix/trivial-rewrite pid 27547 exit status 1
Jun 29 19:50:58 208 postfix/master[27512]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Jun 29 19:51:58 208 postfix/trivial-rewrite[27549]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:51:58 208 postfix/trivial-rewrite[27549]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:51:59 208 postfix/qmgr[27516]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:51:59 208 postfix/qmgr[27516]: warning: problem talking to service rewrite: Success
Jun 29 19:51:59 208 postfix/master[27512]: warning: process /usr/lib/postfix/trivial-rewrite pid 27549 exit status 1
Jun 29 19:51:59 208 postfix/master[27512]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Jun 29 19:52:59 208 postfix/trivial-rewrite[27551]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:52:59 208 postfix/trivial-rewrite[27551]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:53:00 208 postfix/qmgr[27516]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:53:00 208 postfix/qmgr[27516]: warning: problem talking to service rewrite: Success
Jun 29 19:53:00 208 postfix/master[27512]: warning: process /usr/lib/postfix/trivial-rewrite pid 27551 exit status 1
Jun 29 19:53:00 208 postfix/master[27512]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
Jun 29 19:53:30 208 postfix/postfix-script: stopping the Postfix mail system
Jun 29 19:53:30 208 postfix/master[27512]: terminating on signal 15
Jun 29 19:53:30 208 postfix/postfix-script: starting the Postfix mail system
Jun 29 19:53:30 208 postfix/master[27657]: daemon started -- version 2.3.6, configuration /etc/postfix
Jun 29 19:53:30 208 postfix/qmgr[27659]: 094B372065A: from=<notice-return-8nxi8xwa4b5njjx@ga-mail.action.freepress.net>, size=15471, nrcpt=1 (queue active)
Jun 29 19:53:30 208 postfix/trivial-rewrite[27666]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Jun 29 19:53:30 208 postfix/trivial-rewrite[27666]: fatal: mysql:/etc/postfix/mysql-virtual.cf(0,lock|fold_fix): table lookup problem
Jun 29 19:53:31 208 postfix/qmgr[27659]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Jun 29 19:53:31 208 postfix/master[27657]: warning: process /usr/lib/postfix/trivial-rewrite pid 27666 exit status 1
Jun 29 19:53:31 208 postfix/master[27657]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
208 ~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.madgizmo.com ESMTP Postfix
^]
telnet> quit
Connection closed.


if that helps

it seems to be mysql problems now and it still doesn't connect :(
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Jul 02, 2007 1:08 pm    Post subject: Reply with quote

It can't authenticate.

Quote:

Jun 29 19:48:55 208 postfix/trivial-rewrite[27528]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Access denied for user 'mailsql'@'localhost' (using password: YES)
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Tue Jul 03, 2007 2:58 am    Post subject: Reply with quote

more things are working now, i fixed it i relized the password wasn't set correctly but

Code:

208 ~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.madgizmo.com ESMTP Postfix
^]
telnet> quit
Connection closed.


it freezes there

i can't really find any errors from where i should work with now, i just reset postfix and all i get is
Code:

Jul  2 21:41:26 208 postfix/smtpd[20405]: disconnect from madgizmo.com[127.0.0.1]
Jul  2 21:44:26 208 postfix/postfix-script: stopping the Postfix mail system
Jul  2 21:44:26 208 postfix/master[18004]: terminating on signal 15
Jul  2 21:44:26 208 postfix/postfix-script: starting the Postfix mail system
Jul  2 21:44:26 208 postfix/master[20533]: daemon started -- version 2.3.6, configuration /etc/postfix


i do see some emails coming in so something is working, any ideas?
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Tue Jul 03, 2007 7:16 am    Post subject: Reply with quote

You say it freezes. In response to what exactly? Are you issuing an EHLO?
Back to top
View user's profile Send private message
fefeh
n00b
n00b


Joined: 23 Nov 2004
Posts: 43

PostPosted: Tue Jul 03, 2007 3:12 pm    Post subject: Reply with quote

rgk wrote:

Code:

208 ~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.madgizmo.com ESMTP Postfix
^]
telnet> quit
Connection closed.


it freezes there


It will freeze there until you enter something. I'll post the part I did up there, but bold the user-input so you can see.

telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 hostname.domain.com ESMTP Postfix
helo domain.com
250 hostname.domain.com
mail from: fefeh@domain.com
250 2.1.0 Ok
rcpt to: fefeh@domain.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
aksjdfkalsdkfj
alksdjfkalsdjf
.

250 2.0.0 Ok: queued as 4782E63CE5
quit
221 2.0.0 Bye
Connection closed by foreign host.

Hopefully that makes it a little more clear. You're getting there. :D
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Tue Jul 03, 2007 10:26 pm    Post subject: Reply with quote

Thanks, it now works!

mail from: rgk@madgizmo.com
rcpt to: rgk@madgizmo.com

both do not work, i am guessing because i haven't set up mysql through phpmyadmin correctly but i tried and it still doesn't seem to be working, i looked at the guide and it really gave me no where to work with, anyone have an example i can use?

Thanks again though!
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Wed Jul 04, 2007 7:38 am    Post subject: Reply with quote

You shouldn't need to guess as the logs and a bit of MySQL should give you the answers. However...

You need to make sure your MySQL queries run by Postfix match the DB you have created.

You can have a list of my Postfix set up and the queries run.


From main.cf
Code:

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:207
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 1024000000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 207
virtual_transport = virtual
virtual_uid_maps = static:207


Here are the queries:-

Code:

mysql_relay_domains_maps.cf:query = SELECT domain FROM domain WHERE domain='%s' and backupmx = '1'
mysql_virtual_alias_maps.cf:query = SELECT goto FROM alias WHERE address='%s'
mysql_virtual_domains_maps.cf:query = SELECT description FROM domain WHERE domain='%s'
mysql_virtual_mailbox_limit_maps.cf:query = SELECT quota FROM mailbox WHERE username='%s'
mysql_virtual_mailbox_maps.cf:query = SELECT maildir FROM mailbox WHERE username='%s'
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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