magicdude4eva / port25-bouncehandler

Port25 PowerMTA bounce handler for Interspire and MailWizz
MIT License
73 stars 42 forks source link

I wanna contact you #2

Closed telesyssoftsolution closed 8 years ago

telesyssoftsolution commented 8 years ago

Hi Dear,

I like your code, it is cool, Is it possible for you to add me in skype. My skype is "telesyssoftsolution"

Waiting to hear from you very soon on skype.

Thanks

Regards Gopal Tripathi interspireaddon.com

telesyssoftsolution commented 8 years ago

it is not working for me. All emails still active in IEM, there is no change...... and it is giving warning as well as error also

[root@srv ~]# cat /var/log/pmta/bounce-2016-07-25-0000.csv | /usr/bin/php /opt/pmta/bouncehandler/bouncehandler.php --debug X-Powered-By: PHP/5.5.30 Content-type: text/html

[25/Jul/2016:04:34:02] ------------------------------------------------------------------ [25/Jul/2016:04:34:02] Port25 PowerMTA bounce-handler 25/Jul/2016:04:34:02 2016 Gerd Naschenweng http://github.com/magicdude4eva [25/Jul/2016:04:34:02] ------------------------------------------------------------------ [25/Jul/2016:04:34:02] Handling bounce categories=bad-mailbox,bad-domain,routing-errors,inactive-mailbox,spam-related [25/Jul/2016:04:34:02] Bounce-provider: Interspire, initialising [25/Jul/2016:04:34:02] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:04:34:02] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:04:34:02] Bounce-provider: Interspire, complete
Warning: require_once(/opt/pmta/bouncehandler/providers/bounce-provider-mailwizz.php): failed to open stream: No such file or directory in /opt/pmta/bouncehandler/bouncehandler.php on line 103

Fatal error: require_once(): Failed opening required '/opt/pmta/bouncehandler/providers/bounce-provider-mailwizz.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /opt/pmta/bouncehandler/bouncehandler.php on line 103

telesyssoftsolution commented 8 years ago

waiting for your reply.

telesyssoftsolution commented 8 years ago

believe me. You will not disappointed

magicdude4eva commented 8 years ago

If you do not use MailWizz, then comment out https://github.com/magicdude4eva/port25-bouncehandler/blob/master/bouncehandler.php#L103

telesyssoftsolution commented 8 years ago

after running code manually, it is not unsubscribing any email in my interspire. will you please add me in skype "telesyssoftsolution"

magicdude4eva commented 8 years ago

I don't do Skype support. Post full output of log file here. You can also run bouncehandler manually via

cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug
telesyssoftsolution commented 8 years ago

after commenting line 103 it is giving error and not doing any unsubscribe in my IEM, If you want i can share my server details with you.

[root@srv ~]# cat /var/log/pmta/bounce-2016-07-25-0000.csv | /usr/bin/php /opt/pmta/bouncehandler/bouncehandler.php --debug X-Powered-By: PHP/5.5.30 Content-type: text/html

[25/Jul/2016:04:34:02] ------------------------------------------------------------------ [25/Jul/2016:04:34:02] Port25 PowerMTA bounce-handler 25/Jul/2016:04:34:02 2016 Gerd Naschenweng http://github.com/magicdude4eva [25/Jul/2016:04:34:02] ------------------------------------------------------------------ [25/Jul/2016:04:34:02] Handling bounce categories=bad-mailbox,bad-domain,routing-errors,inactive-mailbox,spam-related [25/Jul/2016:04:34:02] Bounce-provider: Interspire, initialising [25/Jul/2016:04:34:02] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:04:34:02] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:04:34:02] Bounce-provider: Interspire, complete

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

...........................unlimited times

I am not talking about skype support. we can work together, so i am asking me to add in skype

telesyssoftsolution commented 8 years ago

I mean to say, you can do custom development for me and i am ready to pay for your time and knowledge. So that asking you to add me on skype

telesyssoftsolution commented 8 years ago

it seems you closed this issue. Am i right

magicdude4eva commented 8 years ago

create a simple CSV file which just contains the email address - i.e. bounce.csv

address1@domain.com
address2@domain.com

then run the command manually: cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug

Output should be something like this:

[root@mailserver pmta]# cat /tmp/bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug
[25/Jul/2016:09:01:51] ------------------------------------------------------------------
[25/Jul/2016:09:01:51] Port25 PowerMTA bounce-handler
[25/Jul/2016:09:01:51] (C) 2016 Gerd Naschenweng  http://github.com/magicdude4eva
[25/Jul/2016:09:01:51] ------------------------------------------------------------------
[25/Jul/2016:09:01:51] Handling bounce categories=bad-mailbox,bad-domain,routing-errors,inactive-mailbox,spam-related
[25/Jul/2016:09:01:51] Bounce-provider: Interspire, initialising
[25/Jul/2016:09:01:51]    Endpoint-URL=http://campaigns.bidorbuy.co.za/xml.php
[25/Jul/2016:09:01:51]    Interspire enabled with lists=112,3,32,95,81,108,109,115,116,117
[25/Jul/2016:09:01:51] Bounce-provider: Interspire, complete
[25/Jul/2016:09:01:51] Bounce-provider: MailWizz, initialising
[25/Jul/2016:09:01:51]    Endpoint-URL=https://hermes.bidorbuy.co.za/api
[25/Jul/2016:09:01:51]    MailWizz enabled!
[25/Jul/2016:09:01:51] Bounce-provider: MailWizz, complete
[25/Jul/2016:09:01:51] Bounce-provider: Bidorbuy, initialising
[25/Jul/2016:09:01:51] Bounce-provider: Bidorbuy, complete
[25/Jul/2016:09:01:51] Feedback-provider: initialising
[25/Jul/2016:09:01:51] Feedback-provider: complete
[25/Jul/2016:09:01:51] Initialising RRD reporting via /var/log/pmta/pmta.rrd
[25/Jul/2016:09:01:51] Starting bounce processing
[25/Jul/2016:09:01:51]    MailWizz: Skipping address1@domain.com, already unsubscribed!
[25/Jul/2016:09:01:51]    Interspire: Skipping recipient address1@domain.com - no subscribed lists returned
[25/Jul/2016:09:01:51]    MailWizz: Skipping address2@domain.com, already unsubscribed!
[25/Jul/2016:09:01:51]    Interspire: Skipping recipient address2@domain.com - no subscribed lists returned
[25/Jul/2016:09:01:51] Completed bounce processing! Total records=3, processed=2, skipped=1

I don't really have the time to do custom development, but if there are suggestions/improvements to the current projects I do, then log them as a separate issue.

telesyssoftsolution commented 8 years ago

I did the same, I created a simple file with just few email addressees and run command manually in ssh but still nothing unsubscribed

[root@srv ~]# cat /var/log/pmta/bounce-2016-07-25-0001.csv | /usr/bin/php /opt/p mta/bouncehandler/bouncehandler.php --debug X-Powered-By: PHP/5.5.30 Content-type: text/html

[25/Jul/2016:07:04:55] --------------------------------------------------------- --------- [25/Jul/2016:07:04:55] Port25 PowerMTA bounce-handler 25/Jul/2016:07:04:55 2016 Gerd Naschenweng http://github.com/magicdude4ev a [25/Jul/2016:07:04:55] --------------------------------------------------------- --------- [25/Jul/2016:07:04:55] Handling bounce categories=bad-mailbox,bad-domain,routing -errors,inactive-mailbox,spam-related [25/Jul/2016:07:04:55] Bounce-provider: Interspire, initialising [25/Jul/2016:07:04:55] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:07:04:55] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:07:04:55] Bounce-provider: Interspire, complete [25/Jul/2016:07:04:55] Bounce-provider: MailWizz, initialising [25/Jul/2016:07:04:55] Endpoint-URL=http://mailwizz.domain.com/api [25/Jul/2016:07:04:55] Failed connecting to http://mailwizz.domain.com/api, e rror=404 [25/Jul/2016:07:04:55] Feedback-provider: initialising
Warning: require_once(PHPMailer/PHPMailerAutoload.php): failed to open s tream: No such file or directory in /opt/pmta/bouncehandler/providers/feedbac k-loop-processor.php on line 37

Fatal error: require_once(): Failed opening required 'PHPMailer/PHPMaile rAutoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /opt/pmt a/bouncehandler/providers/feedback-loop-processor.php on line 37<br / > [root@srv ~]#

telesyssoftsolution commented 8 years ago

[root@srv ~]# cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug cat: bounce.csv: No such file or directory [25/Jul/2016:07:14:54] ------------------------------------------------------------------ [25/Jul/2016:07:14:54] Port25 PowerMTA bounce-handler 25/Jul/2016:07:14:54 2016 Gerd Naschenweng http://github.com/magicdude4eva [25/Jul/2016:07:14:54] ------------------------------------------------------------------ [25/Jul/2016:07:14:54] Handling bounce categories=bad-mailbox,bad-domain,routing-errors,inactive-mailbox,spam-related [25/Jul/2016:07:14:54] Bounce-provider: Interspire, initialising [25/Jul/2016:07:14:54] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:07:14:54] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:07:14:54] Bounce-provider: Interspire, complete [25/Jul/2016:07:14:54] Bounce-provider: MailWizz, initialising [25/Jul/2016:07:14:54] Skipped - not configured! [25/Jul/2016:07:14:54] Bounce-provider: MailWizz, complete [25/Jul/2016:07:14:54] Feedback-provider: initialising

Warning: require_once(PHPMailer/PHPMailerAutoload.php): failed to open stream: No such file or directory in /opt/pmta/bouncehandler/providers/feedback-loop-processor.php on line 37

Fatal error: require_once(): Failed opening required 'PHPMailer/PHPMailerAutoload.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /opt/pmta/bouncehandler/providers/feedback-loop-processor.php on line 37 [root@srv ~]#

No email unsubscribed in my Interspire

magicdude4eva commented 8 years ago

you will have to comment out the feedback-loop-processor.php as well if you do not use it.

magicdude4eva commented 8 years ago

FWIW - I noticed that you commercially sell a cron-based solution (http://interspireaddon.com/solutions/powermta-bemote-bounce-processor). Please be aware that this Github project can not be used commercially and if offered to customers needs to be offered for free and with all copyright information intact.

telesyssoftsolution commented 8 years ago

no worry that is my own developed code. I am not going to sell your code.

telesyssoftsolution commented 8 years ago

i did commented feedback-loop-processor.php

getting this Warning

Warning: fgetcsv() expects parameter 1 to be resource, string given in /opt/pmta/bouncehandler/bouncehandler.php on line 120
^C [root@srv ~]#

magicdude4eva commented 8 years ago

That means that whatever you are trying to pipe into the bounce-handler does not exist.

My suggestion is to use a file as explained above and test it first

cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug

From the above it actually says that the file does not exist:

[root@srv ~]# cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug
cat: bounce.csv: No such file or directory
telesyssoftsolution commented 8 years ago

[root@srv ~]# cat bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --d ebug cat: bounce.csv: No such file or directory [25/Jul/2016:14:51:59] --------------------------------------------------------- --------- [25/Jul/2016:14:51:59] Port25 PowerMTA bounce-handler 25/Jul/2016:14:51:59 2016 Gerd Naschenweng http://github.com/magicdude4ev a [25/Jul/2016:14:51:59] --------------------------------------------------------- --------- [25/Jul/2016:14:51:59] Handling bounce categories=bad-mailbox,bad-domain,routing -errors,inactive-mailbox,spam-related [25/Jul/2016:14:51:59] Bounce-provider: Interspire, initialising [25/Jul/2016:14:51:59] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:14:52:00] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:14:52:00] Bounce-provider: Interspire, complete [25/Jul/2016:14:52:00] Bounce-provider: MailWizz, initialising [25/Jul/2016:14:52:00] Skipped - not configured! [25/Jul/2016:14:52:00] Bounce-provider: MailWizz, complete [25/Jul/2016:14:52:00] Feedback-provider: initialising [25/Jul/2016:14:52:00] Initialising RRD reporting via /var/log/pmta/pmta.rrd

Warning: dl(): Unable to load dynamic library '/usr/local/lib/php/extensions/no- debug-non-zts-20121212/rrd.so' - /usr/local/lib/php/extensions/no-debug-non-zts- 20121212/rrd.so: cannot open shared object file: No such file or directory in /o pt/pmta/bouncehandler/setup.php on line 164 [25/Jul/2016:14:52:00] RRD not installed, please install php-pecl-rrd or php-r rdtool [25/Jul/2016:14:52:00] Starting bounce processing [25/Jul/2016:14:52:00] Completed bounce processing! Total records=0, processed=0 , skipped=0 [root@srv ~]#

Believe me file is there, file exist, do you want my server login details? i can share with you. I really want to see it working

telesyssoftsolution commented 8 years ago

[root@srv ~]# cat /opt/pmta/bouncehandler/bounce.csv | /usr/bin/php /opt/pmta/bouncehandler/bouncehandler.php --debug X-Powered-By: PHP/5.5.30 Content-type: text/html

[25/Jul/2016:17:04:41] ------------------------------------------------------------------ [25/Jul/2016:17:04:41] Port25 PowerMTA bounce-handler 25/Jul/2016:17:04:41 2016 Gerd Naschenweng http://github.com/magicdude4eva [25/Jul/2016:17:04:41] ------------------------------------------------------------------ [25/Jul/2016:17:04:41] Handling bounce categories=bad-mailbox,bad-domain,routing-errors,inactive-mailbox,spam-related [25/Jul/2016:17:04:41] Bounce-provider: Interspire, initialising [25/Jul/2016:17:04:41] Endpoint-URL=http://clients.securemetrix.com/xml.php [25/Jul/2016:17:04:41] Interspire enabled with lists=43,13,4,5,6,7,8,9,10,11 [25/Jul/2016:17:04:41] Bounce-provider: Interspire, complete

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

Warning: fgetcsv() expects parameter 1 to be resource, string given in < b>/opt/pmta/bouncehandler/bouncehandler.php on line 120

This warning is coming unlimited times. I need to stop it manually, How to stop this warning?

magicdude4eva commented 8 years ago

To me it looks the content of bounce.csv is wrong. It should be just one email-address per line - i.e.

a@test.com
b@test.com
c@test.com
telesyssoftsolution commented 8 years ago

there is just one record

type,timeQueued,bounceCat,vmta,orig,rcpt,srcMta,dlvSourceIp,jobId,dsnStatus,dsnMta,dsnDiag b,2016-07-24 23:34:09+0200,spam-related,pmta-vmta337,return-path@pixelward.com,ASAP215@YAHOO.COM,clients.securemetrix.com (149.56.25.23),103.229.67.84,,5.0.0 (undefined status),mta5.am0.yahoodns.net (98.136.216.25),

telesyssoftsolution commented 8 years ago

I can see this error, do you think i need to install it

[25/Jul/2016:14:52:00] RRD not installed, please install php-pecl-rrd or php-r rdtool

do you have any guide or url which can help to install it

magicdude4eva commented 8 years ago

just use a simple file with one email-address per line to test that everything else works.

once this works, read the README to configure Port25. All of what I have seen are config issues and could have been resolved by reading the instructions.

The RRD is not required - how to disable it is explained in setup.php.

telesyssoftsolution commented 8 years ago

/opt/pmta/bouncehandler <-- is it the correct location to put bounce.csv file ?

telesyssoftsolution commented 8 years ago

it seems it will never work for me

telesyssoftsolution commented 8 years ago

bounce.csv is like this

a@test.com b@test.com c@test.com

placed here:-- /opt/pmta/bouncehandler

Owner is "pmta"

still it is saying no such file or directory.

What is this warning:--> Warning: fgetcsv() expects parameter 1 to be resource, string given in /opt/pmta/bouncehandler/bouncehandler.php on line 111

how to stop this warning

telesyssoftsolution commented 8 years ago

this is written in line 111 and 112

$log->lwrite('Starting bounce processing');

while(( $bounceRecord = fgetcsv(STDIN,4096)) !== FALSE ) {

++$totalRecords;

telesyssoftsolution commented 8 years ago

Is anything wrong here, in this code

$log->lwrite('Starting bounce processing');

while(( $bounceRecord = fgetcsv(STDIN,4096)) !== FALSE ) {

++$totalRecords;

// If the line is empty or it is the header line, we skip if (!$bounceRecord || $bounceRecord[0]=="type") { ++$totalRecordsSkipped; continue; }

$STANDALONE_MODE = false;$BOUNCE_MODE = false;$FEEDBACK_LOOP_MODE = false; $recipient = null;

// Let's check if this is standalone mode - i.e. we get a CSV and the first column is the email address to handle as the bounce // If the first record is not an email we assume it is a bounce record if (filter_var($bounceRecord[0], FILTER_VALIDATE_EMAIL)) { $STANDALONE_MODE = true;$BOUNCE_MODE = true; $recipient = $bounceRecord[0]; }

magicdude4eva commented 8 years ago

There is nothing wrong with the code. If you followed the instructions in the README, then do the following:

vi /tmp/bounce.csv

Insert the following as a test

a@test.com
b@test.com
c@test.com

Then run

cat /tmp/bounce.csv | php /opt/pmta/bouncehandler/bouncehandler.php --debug

I also suggest to read through setup.php and configure/disable what you do not require. The bouncehandler is not intended to run out-of-the-box and requires configuration as well as correct permissions.

The PHP code is written with minimal dependencies and works across a good 100 installations so far without any issues.

magicdude4eva commented 8 years ago

Closed - had a similar incident with another user and it turned out to be environmental: