Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

[BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! !

Quote Reply
[BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! !
Hello!

After upgrading from 2.0.2 ? 2.1.0, the incoming.pl did not work. Checked the forum and upgraded the script version 1.59 to 1.61! (Is this the latest?)

The following error:

Code:
GMail (71215): Parsing the header of message number 1. at incoming.pl line 483.
GT::Mail::POP3 (71215): Getting head of message 1 ... at /email/admin/GT/Mail/POP3.pm line 392.
GT::Mail::POP3 (71215): --? TOP 1 0 at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): ?-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): Top of message 1 retrieved. at /email/admin/GT/Mail/POP3.pm line 407.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT password FROM email_users WHERE email = 'com-user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT password FROM email_users WHERE email = 'user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GMail (71215): Looking at (user@domain.com) from the 'To' line at incoming.pl line 609.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_users WHERE email = 'user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 007 ) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 007 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_email IS NULL at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 007 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: INSERT INTO email_dgraph (dgraph_userid) VALUES (007) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
DBD::mysql::st execute failed: Duplicate entry '' for key 2 at /email/admin/GT/SQL/Driver/MYSQL.pm line 117.
GT::Mail::POP3 (71215): --? QUIT at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): ?-- +OK at /email/admin/GT/Mail/POP3.pm line 178.

Note that earlier it had ?user@domain.com?! But after the upgrade it produces ?com-user@domain.com?!!! This is ofcourse because Adrian added

my $m = $POP-?parse_message($num);

but what I do not understand is where does com- gets added?

Last edited by:

rajani: Jun 25, 2002, 12:47 PM
Quote Reply
Re: [rajani] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Can you email me the complete log of incoming.pl -v (you can remove the username and password of the pop3 account)

It looks like there's something else going wrong there:
DBD::mysql::st execute failed: Duplicate entry '' for key 2 at /email/admin/GT/SQL/Driver/MYSQL.pm line 117.
That line doesn't look right.

Adrian
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!



Yes, its something more out there which is wrong. Following is the log that you wanted to know:
Code:
GMail (71215): Connecting to POP server receive.com. at incoming.pl line 310.
GT::Mail::POP3 (71215): Attempting to connect .. at /email/admin/GT/Mail/POP3.pm line 281.
GT::Mail::POP3 (71215): Connected to receive.com on port 110 at /email/admin/GT/Mail/POP3.pm line 293.
GT::Mail::POP3 (71215): Going to login at /email/admin/GT/Mail/POP3.pm line 315.
GT::Mail::POP3 (71215): Attempting to log in via clear text ... at /email/admin/GT/Mail/POP3.pm line 363.
GT::Mail::POP3 (71215): --> USER myself at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): --> PASS xxxxx at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): --> STAT at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK 195 1809500 at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): STAT successful - count: 195 size: 1809500 at /email/admin/GT/Mail/POP3.pm line 500.
GT::Mail::POP3 (71215): Login successful. at /email/admin/GT/Mail/POP3.pm line 382.
GMail (71215): 195 message(s) on server. at incoming.pl line 324.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_users WHERE email = 'admin@localhost' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 1 ) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 1 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_folders WHERE folders_userid = 1 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::Mail::POP3 (71215): --> LIST at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): 195 messages listed. at /email/admin/GT/Mail/POP3.pm line 528.
GMail (71215): Parsing the header of message number 1. at incoming.pl line 483.
GT::Mail::POP3 (71215): Getting head of message 1 ... at /email/admin/GT/Mail/POP3.pm line 392.
GT::Mail::POP3 (71215): --> TOP 1 0 at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (71215): Top of message 1 retrieved. at /email/admin/GT/Mail/POP3.pm line 407.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT password FROM email_users WHERE email = 'com-user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT password FROM email_users WHERE email = 'user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GMail (71215): Looking at (user@domain.com) from the 'To' line at incoming.pl line 609.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_users WHERE email = 'user@domain.com' at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 007 ) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 007 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_email IS NULL at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 007 at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (71215): Executing query: INSERT INTO email_dgraph (dgraph_userid) VALUES (007) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
DBD::mysql::st execute failed: Duplicate entry '' for key 2 at /email/admin/GT/SQL/Driver/MYSQL.pm line 117.
GT::Mail::POP3 (71215): --> QUIT at /email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (71215): <-- +OK at /email/admin/GT/Mail/POP3.pm line 178.
rajani@server%

Last edited by:

rajani: Jun 25, 2002, 2:56 PM
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Ack, Adrian, you asked me to email, but I was in a hurry and have posted it...never mind...
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!

There is definately something wrong in my installation.

I have run consistency.pl on the data. Following is the error:

1 messages were on disk and not in the database

rajani@% perl5 consistency.pl
Messags in database: xxx

0 messages were on disk and not in the database

xxx messages were in the database but not on disk
validate table inconsistancies: 0
msgtrack table inconsistancies: 0
msgs table inconsistancies: 2626
msgs_threads table inconsistancies: 0
msgdata table inconsistancies: 0
msgsearch table inconsistancies: 0
msgs_remote table inconsistancies: 0
pop_accounts table inconsistancies: 0
sigs table inconsistancies: 0
address table inconsistancies: 0
filter table inconsistancies: 0
users => dgraph table inconsistancies: 461
dgraph => users table inconsistancies: 0
DBD::mysql::st execute failed: Unknown column 'email_users.user' in 'on clause' at /email/admin/GT/SQL/Driver/MYSQL.pm line 117.
rajani@%

There seems to be change in the name of a column during the installation and may be hence the error... Just an observation!!!

Last edited by:

rajani: Jun 25, 2002, 3:21 PM
Quote Reply
Re: [rajani] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
In Reply To:
DBD::mysql::st execute failed: Unknown column 'email_users.user' in 'on clause' at /email/admin/GT/SQL/Driver/MYSQL.pm line 117.
It looks like your database is still at <2.0.6 as the user column in the user table has been changed to 'email' in 2.0.6. You really need to complete the upgrade before you try doing anything else.

Adrian
Quote Reply
Re: [rajani] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
In Reply To:
GT::SQL::Driver::MYSQL::sth (71215): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 007 ) at /email/admin/GT/SQL/Driver/MYSQL.pm line 114.
That's really weird that the userid is '007', not '7'.

Can you email the unedited (except for the pop3 username and password) log of incoming.pl -v? I need this because I want to see exactly what the email addresses it's pulling from the email. If possible, I would also like to see the headers of this email. But first, you must get your database upgraded properly before doing anything else.

Adrian
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!#

When I did the upgrade, it did say it has done 2.x.x > 2.1.0 or the latest. It also did say that it has upgraded the column. The last thing I saw was that it has given a link of admin without any error. Hence I did not suspect any bad upgrading.

However, is there a clue you can give me what I can see if it did not upgrade properly. I can try to upgrade anathor time but fear of fatals.

Following are the column names:

CREATE TABLE email_users (
userid int(10) unsigned NOT NULL auto_increment,
email varchar(255) NOT NULL,
password varchar(16) binary NOT NULL,
users_status enum('Not Validated','Validated','Suspended') DEFAULT 'Validated' NOT NULL,
users_last_login int(11) DEFAULT '0',
users_space_used float(12,2) DEFAULT '0.00' NOT NULL,
users_space_allowed float(12,2) DEFAULT '0.00' NOT NULL,
users_max_pop int(11) DEFAULT '5' NOT NULL,
users_pass_phrase varchar(255),
users_pass_answer varchar(255),
users_join_time int(11) DEFAULT '0' NOT NULL,
users_default_template varchar(255) DEFAULT 'default',
users_footer enum('Yes','No') DEFAULT 'Yes' NOT NULL,
PRIMARY KEY (userid),
UNIQUE userunique (email),
KEY users_pass_ndx (password)
);

CREATE TABLE email_session (
session_id varchar(32) binary NOT NULL,
session_user_id varchar(255) NOT NULL,
session_date int(11) DEFAULT '0' NOT NULL,
session_data text,
PRIMARY KEY (session_id),
KEY session_user_ndx (session_user_id),
KEY session_date_ndx (session_date)
);

I do not see anything wrong out there!!!!111

Last edited by:

rajani: Jun 27, 2002, 6:41 AM
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!

I have deleted a 3 before 007 while editing, which means it was 3007!

The user name was like below:

Alex.Krohn@receive.com and exactly that and nothing else. Now I do not remember the user name but I do very correct the format. The log file that I publish above does not deviate any more than name and id of the user. So be log files, there is not much different that you can really get out of it.

About database, I have given the table column names, so if you find it fishy let me know.
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!

Funny, it works and there has been no change anywhere!!!

May be it was a message or something........
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!

It works but there is something strange. I tried to use it again and it gets killed by itself somewhere sometimes. It is as follows:
Code:
rajani@server% perl5 incoming.pl -v
GMail (15504): Connecting to POP server receive.com. at incoming.pl line 311.
GT::Mail::POP3 (15504): Attempting to connect .. at /xxx/email/admin/GT/Mail/POP3.pm line 281.
GT::Mail::POP3 (15504): Connected to receive.com on port 110 at /xxx/email/admin/GT/Mail/POP3.pm line 293.
GT::Mail::POP3 (15504): Going to login at /xxx/email/admin/GT/Mail/POP3.pm line 315.
GT::Mail::POP3 (15504): Attempting to log in via clear text ... at /xxx/email/admin/GT/Mail/POP3.pm line 363.
GT::Mail::POP3 (15504): --> USER myself at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK at /xxx/email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (15504): --> PASS password at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK at /xxx/email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (15504): --> STAT at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK 5168 2698059 at /xxx/email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (15504): STAT successful - count: 5168 size: 2698059 at /xxx/email/admin/GT/Mail/POP3.pm line 500.
GT::Mail::POP3 (15504): Login successful. at /xxx/email/admin/GT/Mail/POP3.pm line 382.
GMail (15504): 5168 message(s) on server. at incoming.pl line 325.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT * FROM email_users WHERE email = 'admin@localhost' at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 1 ) at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 1 at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT COUNT(*) FROM email_folders WHERE folders_userid = 1 at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::Mail::POP3 (15504): --> LIST at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK at /xxx/email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (15504): 5168 messages listed. at /xxx/email/admin/GT/Mail/POP3.pm line 528.
GMail (15504): Parsing the header of message number 1. at incoming.pl line 483.
GT::Mail::POP3 (15504): Getting head of message 1 ... at /xxx/email/admin/GT/Mail/POP3.pm line 392.
GT::Mail::POP3 (15504): --> TOP 1 0 at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK at /xxx/email/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (15504): Top of message 1 retrieved. at /xxx/email/admin/GT/Mail/POP3.pm line 407.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT password FROM email_users WHERE email = 'Alex.Krohn@receive.com' at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GMail (15504): Looking at (Alex.Krohn@receive.com) from the 'To' line at incoming.pl line 596.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT * FROM email_users WHERE email = 'Alex.Krohn@receive.com' at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT * FROM email_dgraph WHERE ( dgraph_userid = 132 ) at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 132 at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_email IS NULL at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: SELECT COUNT(*) FROM email_dgraph WHERE dgraph_userid = 132 at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
GT::SQL::Driver::MYSQL::sth (15504): Executing query: INSERT INTO email_dgraph (dgraph_userid) VALUES (132) at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 114.
DBD::mysql::st execute failed: Duplicate entry '' for key 2 at /xxx/email/admin/GT/SQL/Driver/MYSQL.pm line 117.
GT::Mail::POP3 (15504): --> QUIT at /xxx/email/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (15504): <-- +OK at /xxx/email/admin/GT/Mail/POP3.pm line 178.

Mind you, admin@localhost is not substituted by me.

Last edited by:

rajani: Jul 8, 2002, 8:43 AM
Quote Reply
Re: [brewt] [BUG REPORT - 2.1.0] ?? Incoming.pl does not work! U R G E N T ! ! ! In reply to
Hello Adrian!

Found the problem. The database is inconsistent!!! The inconsistency has arisen due to a rare BUG that was in the script earlier and I was the first to be victimised.

OK, now something started to make sense. The database is screwed up since the time when I tried to purge users and it did not work on my server. Hence the COUNT of user or userID in the tables email_users and email_dgraph is not the same. Thats the problem.

In the logs it can be seen clearly that it gets killed because it cannot execute the query. The Query cannot be executed because it HAS_HAS_HAS to query in both the tables. In both the tables the user does not match.

So in the table email_users, the user entry of userID 132 does exists and there is no entry in the dgraph about this user.

Hence there needs to be something changed. It cannot query both the tables, but only the email_users.

Why should it Query the table dgraph also? Thats the problem.

How and where should I change it?

Last edited by:

rajani: Jul 8, 2002, 9:06 AM