Solved

Postfix Access table issue, New account emails are not being recorded in the acccess table running Exchange 2003

Posted on 2010-09-04
16
392 Views
Last Modified: 2012-05-10
Dear Experts,

Over past two weeks, new email address are not being recorded in the access.db. I am running exchange 2003 enterprise and running postfix as mail relay and normally when we create new email account, the email address gets recorded in postfix access table which enables it to relay emails externally and receive emails from external users.

but if I email that account from my gmail account, the email gets bounced back stating rejected.

Can you please let me know, when can we do to resolve this. There was some kind of tool that runs on exchange that scans ad for new emails and updates  postfix, not sure but that not running anymore.

Please help, experts.

0
Comment
Question by:mshaikh22
  • 11
  • 5
16 Comments
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
ID: 33602661
Are you running postmap on the access file?
0
 

Author Comment

by:mshaikh22
ID: 33602739
i run that command manually postmap access
its still doesnt do anything
the email address dont exist in the access table
tried adding them manually by doing nano access.db
entered the email address manually and save the access.db file restarted postfix.

Worked a few times and after that stopped working
looks the email addresses i put disppear afterward now it doesnt save at all.
0
 

Author Comment

by:mshaikh22
ID: 33604487
Hello Experts,


Just wanted to see if anyone has experience this issue before caz im still wondering how to solve this riddle.
Please let me know as soon as you can,

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:mshaikh22
ID: 33722504
Need help with this. I keep manually entering email address in the access.db table. But it disappears after a few days
0
 

Author Comment

by:mshaikh22
ID: 34036471
Can you please tell why do the email address that I enter in the database access.db disappear.
0
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
ID: 34036532
Either something is overwriting your access.db file or your access file is changed and remapped. Check the system for cron jobs.
0
 

Author Comment

by:mshaikh22
ID: 34037905
Thank you for that svgmuc. Could you please tell me know where can i look for the cron jobs.
Am I suppose to enter email address manually in the access.db or does the cron job run and does update the emails for me.

0
 
LVL 14

Assisted Solution

by:svgmuc
svgmuc earned 500 total points
ID: 34037995
You can run the command

crontab -l

as the user root or the user postfix is running as.
This will list all cron jobs.

A cron job can be any kind of command or script. It may modify data which includes your access.db file. I have no idea though, what is on your mail server.
0
 

Author Comment

by:mshaikh22
ID: 34038265
this is what i see


0 0,6,12,18,21 * * *       /usr/bin/freshclam
0 0 * * *       /usr/bin/sa-update
0,10,30,50 * * * * /usr/local/bin/exchange-email-push
0 23 * * * find /home/quarantine/ -mtime +10 -exec rm -f {} \;
0
 

Author Comment

by:mshaikh22
ID: 34038503
0,10,30,50 * * * * /usr/local/bin/exchange-email-push

how does this work

exchange-email-push
Connected to ex0svr
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
331 Anonymous access allowed, send identity (e-mail name) as password.
230 Anonymous user logged in.
Local directory now /etc/postfix
local: public.emails remote: public.emails
227 Entering Passive Mode (10,168,1,35,134,203).
125 Data connection already open; Transfer starting.
226 Transfer complete.
313123 bytes received in 0.016 seconds (2e+04 Kbytes/s)
local: users.emails remote: users.emails
227 Entering Passive Mode (10,168,1,35,134,206).
125 Data connection already open; Transfer starting.
226 Transfer complete.
334851 bytes received in 0.018 seconds (1.9e+04 Kbytes/s)
221
0
 

Author Comment

by:mshaikh22
ID: 34073178
can i get some help on this please.
0
 

Author Comment

by:mshaikh22
ID: 34116737
help please

0,10,30,50 * * * * /usr/local/bin/exchange-email-push

how does this work

exchange-email-push
Connected to ex0svr
220 Microsoft FTP Service
500 'AUTH GSSAPI': command not understood
500 'AUTH KERBEROS_V4': command not understood
KERBEROS_V4 rejected as an authentication type
331 Anonymous access allowed, send identity (e-mail name) as password.
230 Anonymous user logged in.
Local directory now /etc/postfix
local: public.emails remote: public.emails
227 Entering Passive Mode (10,168,1,35,134,203).
125 Data connection already open; Transfer starting.
226 Transfer complete.
313123 bytes received in 0.016 seconds (2e+04 Kbytes/s)
local: users.emails remote: users.emails
227 Entering Passive Mode (10,168,1,35,134,206).
125 Data connection already open; Transfer starting.
226 Transfer complete.
334851 bytes received in 0.018 seconds (1.9e+04 Kbytes/s)
221
0
 
LVL 14

Expert Comment

by:svgmuc
ID: 34118018
This is just the output of a script.
According to the crontab line, it is run at the full hour, at 10min after the full hour, at 30min after the full hour and 10min to the full hour. (Strange schedule)

It transfers 2 files via FTP, public.emails and users.emails from the server to the postfix server.

I cannot see any other information from this output.
0
 

Author Comment

by:mshaikh22
ID: 34310557
Apologies for getting back you  on this.

Could you please help me with this, im thinking whenever this script runs it remove the manually entered email address in access db. Now there something missing in exhcange that prevents the script from running. What could that be.

thank you./


This is the is the script

#!/bin/bash

EXCHANGE=exchange2003
USER=anonymous
NACCESS=access.new
TMP=access.tmp

ftp -v -n "$EXCHANGE" << EOF
user "$USER" sysadmin
lcd /etc/postfix/
get public.emails
get users.emails
quit
EOF
if [ "$?" -ne 0 ]; then
        echo "FTP Exchange push failed to grab new files"
        exit 1
fi


cd /etc/postfix/
# make a copy of the current
cp -f access access.old
cat access.header > "$NACCESS"
cat /dev/null > "$TMP"
/bin/egrep -o '(smtp|SMTP):(.*)' users.emails | sed 's/^smtp://' | sed 's/^SMTP://' | awk '{ print $0"\tOK"; }' >> "$TMP"
/bin/egrep -o '(smtp|SMTP):(.*)' public.emails | sed 's/^smtp://' | sed 's/^SMTP://' | awk '{ print $0"\tOK"; }' >> "$TMP"
sort -u "$TMP" >> "$NACCESS"
mv "$NACCESS" access

#--- update the system
postmap /etc/postfix/access
postfix reload

0
 
LVL 14

Accepted Solution

by:
svgmuc earned 500 total points
ID: 34311017
Okay, run that script manually, then look at the log.

/var/log/messages and /var/log/mail should be the places to look.

Can you see anything unusual?
0
 

Author Closing Comment

by:mshaikh22
ID: 34548836
Good troubleshooting steps
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question