masqmail

changeset 367:b27f66555ba8

Reformated multiline comments to have leading asterisks on each line Now we use: /* ** comment */ This makes the indent style simpler, too.
author markus schnalke <meillo@marmaro.de>
date Thu, 20 Oct 2011 10:20:59 +0200
parents 41958685480d
children b35c17fcf69d
files src/accept.c src/address.c src/alias.c src/base64/base64.c src/base64/base64.h src/child.c src/conf.c src/connect.c src/deliver.c src/dotlock.c src/dotlock.h src/expand.c src/fail_msg.c src/header.c src/interface.c src/listen.c src/local.c src/log.c src/lookup.c src/lookup.h src/masqmail.c src/masqmail.h src/md5/hmac_md5.c src/md5/hmactest.c src/message.c src/mservdetect.c src/online.c src/parse.c src/peopen.c src/permissions.c src/queue.c src/readsock.c src/readsock.h src/readtest.c src/resolvtest.c src/rewrite.c src/route.c src/smtp_in.c src/smtp_out.c src/smtp_out.h src/smtpsend.c src/spool.c src/tables.c src/timeival.c
diffstat 44 files changed, 1177 insertions(+), 1019 deletions(-) [+]
line diff
     1.1 --- a/src/accept.c	Thu Sep 22 15:07:40 2011 +0200
     1.2 +++ b/src/accept.c	Thu Oct 20 10:20:59 2011 +0200
     1.3 @@ -1,20 +1,21 @@
     1.4 -/*  MasqMail
     1.5 -    Copyright (C) 1999-2001 Oliver Kurth
     1.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
     1.7 -
     1.8 -    This program is free software; you can redistribute it and/or modify
     1.9 -    it under the terms of the GNU General Public License as published by
    1.10 -    the Free Software Foundation; either version 2 of the License, or
    1.11 -    (at your option) any later version.
    1.12 -
    1.13 -    This program is distributed in the hope that it will be useful,
    1.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.16 -    GNU General Public License for more details.
    1.17 -
    1.18 -    You should have received a copy of the GNU General Public License
    1.19 -    along with this program; if not, write to the Free Software
    1.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.21 +/*
    1.22 +**  MasqMail
    1.23 +**  Copyright (C) 1999-2001 Oliver Kurth
    1.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    1.25 +**
    1.26 +**  This program is free software; you can redistribute it and/or modify
    1.27 +**  it under the terms of the GNU General Public License as published by
    1.28 +**  the Free Software Foundation; either version 2 of the License, or
    1.29 +**  (at your option) any later version.
    1.30 +**
    1.31 +**  This program is distributed in the hope that it will be useful,
    1.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.34 +**  GNU General Public License for more details.
    1.35 +**
    1.36 +**  You should have received a copy of the GNU General Public License
    1.37 +**  along with this program; if not, write to the Free Software
    1.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.39  */
    1.40  
    1.41  #include "masqmail.h"
    1.42 @@ -54,11 +55,12 @@
    1.43  	return ret;
    1.44  }
    1.45  
    1.46 -/* accept message from anywhere.
    1.47 -   A message from local is indicated by msg->recieved_host == NULL
    1.48 -
    1.49 -   The -t option: With the ACC_RCPT_FROM_HEAD flag the addrs found found
    1.50 -   in To/Cc/Bcc headers are added to the recipient list.
    1.51 +/*
    1.52 +**  accept message from anywhere.
    1.53 +**  A message from local is indicated by msg->recieved_host == NULL
    1.54 +**
    1.55 +**  The -t option: With the ACC_RCPT_FROM_HEAD flag the addrs found found
    1.56 +**  in To/Cc/Bcc headers are added to the recipient list.
    1.57  */
    1.58  
    1.59  accept_error
    1.60 @@ -146,9 +148,14 @@
    1.61  				if ((hdr = get_header(line1))) {
    1.62  					msg->hdr_list = g_list_append(msg->hdr_list, hdr);
    1.63  				} else {
    1.64 -					/* if get_header() returns NULL, no header was recognized,
    1.65 -					   so this seems to be the first data line of a broken mailer
    1.66 -					   which does not send an empty line after the headers */
    1.67 +					/*
    1.68 +					**  if get_header() returns NULL,
    1.69 +					**  no header was recognized,
    1.70 +					**  so this seems to be the first
    1.71 +					**  data line of a broken mailer
    1.72 +					**  which does not send an empty
    1.73 +					**  line after the headers
    1.74 +					*/
    1.75  					in_headers = FALSE;
    1.76  					msg->data_list = g_list_prepend(msg->data_list, g_strdup(line1));
    1.77  				}
    1.78 @@ -290,10 +297,12 @@
    1.79  		}
    1.80  
    1.81  		if (!msg->return_path) {
    1.82 -			/* TODO: do we still need this as we don't fetch
    1.83 -			         mail anymore? */
    1.84 -			/* this can happen for pop3 accept only and if no
    1.85 -			   Return-Path: header was given */
    1.86 +			/*
    1.87 +			**  TODO: do we still need this as we don't fetch
    1.88 +			**        mail anymore?
    1.89 +			**  This can happen for pop3 accept only and if no
    1.90 +			**  Return-Path: header was given
    1.91 +			*/
    1.92  			GList *hdr_list;
    1.93  			header *hdr;
    1.94  
     2.1 --- a/src/address.c	Thu Sep 22 15:07:40 2011 +0200
     2.2 +++ b/src/address.c	Thu Oct 20 10:20:59 2011 +0200
     2.3 @@ -1,19 +1,20 @@
     2.4 -/*  MasqMail
     2.5 -    Copyright (C) 1999-2001 Oliver Kurth
     2.6 -
     2.7 -    This program is free software; you can redistribute it and/or modify
     2.8 -    it under the terms of the GNU General Public License as published by
     2.9 -    the Free Software Foundation; either version 2 of the License, or
    2.10 -    (at your option) any later version.
    2.11 -
    2.12 -    This program is distributed in the hope that it will be useful,
    2.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.15 -    GNU General Public License for more details.
    2.16 -
    2.17 -    You should have received a copy of the GNU General Public License
    2.18 -    along with this program; if not, write to the Free Software
    2.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    2.20 +/*
    2.21 +**  MasqMail
    2.22 +**  Copyright (C) 1999-2001 Oliver Kurth
    2.23 +**
    2.24 +**  This program is free software; you can redistribute it and/or modify
    2.25 +**  it under the terms of the GNU General Public License as published by
    2.26 +**  the Free Software Foundation; either version 2 of the License, or
    2.27 +**  (at your option) any later version.
    2.28 +**
    2.29 +**  This program is distributed in the hope that it will be useful,
    2.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    2.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    2.32 +**  GNU General Public License for more details.
    2.33 +**
    2.34 +**  You should have received a copy of the GNU General Public License
    2.35 +**  along with this program; if not, write to the Free Software
    2.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    2.37  */
    2.38  
    2.39  #include "masqmail.h"
     3.1 --- a/src/alias.c	Thu Sep 22 15:07:40 2011 +0200
     3.2 +++ b/src/alias.c	Thu Oct 20 10:20:59 2011 +0200
     3.3 @@ -1,20 +1,21 @@
     3.4 -/*  MasqMail
     3.5 -    Copyright (C) 2000-2001 Oliver Kurth
     3.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
     3.7 -
     3.8 -    This program is free software; you can redistribute it and/or modify
     3.9 -    it under the terms of the GNU General Public License as published by
    3.10 -    the Free Software Foundation; either version 2 of the License, or
    3.11 -    (at your option) any later version.
    3.12 -
    3.13 -    This program is distributed in the hope that it will be useful,
    3.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.16 -    GNU General Public License for more details.
    3.17 -
    3.18 -    You should have received a copy of the GNU General Public License
    3.19 -    along with this program; if not, write to the Free Software
    3.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    3.21 +/*
    3.22 +**  MasqMail
    3.23 +**  Copyright (C) 2000-2001 Oliver Kurth
    3.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    3.25 +**
    3.26 +**  This program is free software; you can redistribute it and/or modify
    3.27 +**  it under the terms of the GNU General Public License as published by
    3.28 +**  the Free Software Foundation; either version 2 of the License, or
    3.29 +**  (at your option) any later version.
    3.30 +**
    3.31 +**  This program is distributed in the hope that it will be useful,
    3.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.34 +**  GNU General Public License for more details.
    3.35 +**
    3.36 +**  You should have received a copy of the GNU General Public License
    3.37 +**  along with this program; if not, write to the Free Software
    3.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    3.39  */
    3.40  
    3.41  #include "masqmail.h"
    3.42 @@ -104,7 +105,7 @@
    3.43  }
    3.44  
    3.45  /*
    3.46 -addr is assumed to be local and no pipe address nor not-to-expand
    3.47 +**  addr is assumed to be local and no pipe address nor not-to-expand
    3.48  */
    3.49  static GList*
    3.50  expand_one(GList *alias_table, address *addr)
    3.51 @@ -120,8 +121,10 @@
    3.52  	DEBUG(6) debugf("alias: '%s' is local and will get expanded\n", addr->local_part);
    3.53  
    3.54  	if (strcasecmp(addr->local_part, "postmaster") == 0) {
    3.55 -		/* postmaster must always be matched caseless
    3.56 -		   see RFC 822 and RFC 5321 */
    3.57 +		/*
    3.58 +		**  postmaster must always be matched caseless
    3.59 +		**  see RFC 822 and RFC 5321
    3.60 +		*/
    3.61  		val = (gchar *) table_find_func(alias_table, addr->local_part, strcasecmp);
    3.62  	} else {
    3.63  		val = (gchar *) table_find_func(alias_table, addr->local_part, conf.localpartcmp);
    3.64 @@ -241,8 +244,11 @@
    3.65  			if (addr_isequal(addr, non_addr, conf.localpartcmp)) {
    3.66  				done_list = g_list_remove_link(done_list, rcpt_node);
    3.67  				g_list_free_1(rcpt_node);
    3.68 -				/* this address is still in the children lists
    3.69 -				   of the original address, simply mark them delivered */
    3.70 +				/*
    3.71 +				**  this address is still in the children
    3.72 +				**  lists of the original address, simply
    3.73 +				**  mark them delivered
    3.74 +				*/
    3.75  				addr_mark_delivered(addr);
    3.76  				break;
    3.77  			}
     4.1 --- a/src/base64/base64.c	Thu Sep 22 15:07:40 2011 +0200
     4.2 +++ b/src/base64/base64.c	Thu Oct 20 10:20:59 2011 +0200
     4.3 @@ -1,19 +1,21 @@
     4.4 -/* base64.c, Copyright 2000 (C) Oliver Kurth,
     4.5 - *
     4.6 - * This program is free software; you can redistribute it and/or modify
     4.7 - * it under the terms of the GNU General Public License as published by
     4.8 - * the Free Software Foundation; either version 2 of the License, or
     4.9 - * (at your option) any later version.
    4.10 - *
    4.11 - * This program is distributed in the hope that it will be useful,
    4.12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.14 - * GNU General Public License for more details.
    4.15 - *
    4.16 - * You should have received a copy of the GNU General Public License
    4.17 - * along with this program; if not, write to the Free Software
    4.18 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    4.19 - */
    4.20 +/*
    4.21 +**  base64.c
    4.22 +**  Copyright 2000 (C) Oliver Kurth,
    4.23 +**
    4.24 +**  This program is free software; you can redistribute it and/or modify
    4.25 +**  it under the terms of the GNU General Public License as published by
    4.26 +**  the Free Software Foundation; either version 2 of the License, or
    4.27 +**  (at your option) any later version.
    4.28 +**
    4.29 +**  This program is distributed in the hope that it will be useful,
    4.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.32 +**  GNU General Public License for more details.
    4.33 +**
    4.34 +**  You should have received a copy of the GNU General Public License
    4.35 +**  along with this program; if not, write to the Free Software
    4.36 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    4.37 +*/
    4.38  
    4.39  /* see also RFC 1341 */
    4.40  
     5.1 --- a/src/base64/base64.h	Thu Sep 22 15:07:40 2011 +0200
     5.2 +++ b/src/base64/base64.h	Thu Oct 20 10:20:59 2011 +0200
     5.3 @@ -1,19 +1,21 @@
     5.4 -/* base64.h, Copyright 2000 (C) Oliver Kurth,
     5.5 - *
     5.6 - * This program is free software; you can redistribute it and/or modify
     5.7 - * it under the terms of the GNU General Public License as published by
     5.8 - * the Free Software Foundation; either version 2 of the License, or
     5.9 - * (at your option) any later version.
    5.10 - *
    5.11 - * This program is distributed in the hope that it will be useful,
    5.12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.14 - * GNU General Public License for more details.
    5.15 - *
    5.16 - * You should have received a copy of the GNU General Public License
    5.17 - * along with this program; if not, write to the Free Software
    5.18 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    5.19 - */
    5.20 +/*
    5.21 +**  base64.h
    5.22 +**  Copyright 2000 (C) Oliver Kurth,
    5.23 +**
    5.24 +**  This program is free software; you can redistribute it and/or modify
    5.25 +**  it under the terms of the GNU General Public License as published by
    5.26 +**  the Free Software Foundation; either version 2 of the License, or
    5.27 +**  (at your option) any later version.
    5.28 +**
    5.29 +**  This program is distributed in the hope that it will be useful,
    5.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.32 +**  GNU General Public License for more details.
    5.33 +**
    5.34 +**  You should have received a copy of the GNU General Public License
    5.35 +**  along with this program; if not, write to the Free Software
    5.36 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    5.37 +*/
    5.38  
    5.39  gchar *base64_encode(guchar *buf, gint len);
    5.40  gchar *base64_decode(gchar *buf, gint *size);
     6.1 --- a/src/child.c	Thu Sep 22 15:07:40 2011 +0200
     6.2 +++ b/src/child.c	Thu Oct 20 10:20:59 2011 +0200
     6.3 @@ -1,19 +1,21 @@
     6.4 -/* child.c, Copyright (C) 2000 by Oliver Kurth,
     6.5 - *
     6.6 - * This program is free software; you can redistribute it and/or modify
     6.7 - * it under the terms of the GNU General Public License as published by
     6.8 - * the Free Software Foundation; either version 2 of the License, or
     6.9 - * (at your option) any later version.
    6.10 - *
    6.11 - * This program is distributed in the hope that it will be useful,
    6.12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.14 - * GNU General Public License for more details.
    6.15 - *
    6.16 - * You should have received a copy of the GNU General Public License
    6.17 - * along with this program; if not, write to the Free Software
    6.18 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    6.19 - */
    6.20 +/*
    6.21 +**  child.c
    6.22 +**  Copyright (C) 2000 by Oliver Kurth,
    6.23 +**
    6.24 +**  This program is free software; you can redistribute it and/or modify
    6.25 +**  it under the terms of the GNU General Public License as published by
    6.26 +**  the Free Software Foundation; either version 2 of the License, or
    6.27 +**  (at your option) any later version.
    6.28 +**
    6.29 +**  This program is distributed in the hope that it will be useful,
    6.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.32 +**  GNU General Public License for more details.
    6.33 +**
    6.34 +**  You should have received a copy of the GNU General Public License
    6.35 +**  along with this program; if not, write to the Free Software
    6.36 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    6.37 +*/
    6.38  
    6.39  #include <errno.h>
    6.40  #include <stdio.h>
     7.1 --- a/src/conf.c	Thu Sep 22 15:07:40 2011 +0200
     7.2 +++ b/src/conf.c	Thu Oct 20 10:20:59 2011 +0200
     7.3 @@ -1,20 +1,21 @@
     7.4 -/*  MasqMail
     7.5 -    Copyright (C) 1999-2001 Oliver Kurth
     7.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
     7.7 -
     7.8 -    This program is free software; you can redistribute it and/or modify
     7.9 -    it under the terms of the GNU General Public License as published by
    7.10 -    the Free Software Foundation; either version 2 of the License, or
    7.11 -    (at your option) any later version.
    7.12 -
    7.13 -    This program is distributed in the hope that it will be useful,
    7.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    7.16 -    GNU General Public License for more details.
    7.17 -
    7.18 -    You should have received a copy of the GNU General Public License
    7.19 -    along with this program; if not, write to the Free Software
    7.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    7.21 +/*
    7.22 +**  MasqMail
    7.23 +**  Copyright (C) 1999-2001 Oliver Kurth
    7.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    7.25 +**
    7.26 +**  This program is free software; you can redistribute it and/or modify
    7.27 +**  it under the terms of the GNU General Public License as published by
    7.28 +**  the Free Software Foundation; either version 2 of the License, or
    7.29 +**  (at your option) any later version.
    7.30 +**
    7.31 +**  This program is distributed in the hope that it will be useful,
    7.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    7.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    7.34 +**  GNU General Public License for more details.
    7.35 +**
    7.36 +**  You should have received a copy of the GNU General Public License
    7.37 +**  along with this program; if not, write to the Free Software
    7.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    7.39  */
    7.40  
    7.41  #include <pwd.h>
    7.42 @@ -142,11 +143,12 @@
    7.43  	return list;
    7.44  }
    7.45  
    7.46 -/* Split the addrs at '@' into local_part and domain. Without an '@'
    7.47 -   everything is local_part. Create address structs, which are put
    7.48 -   into a list and returned.
    7.49 -   This funktion is used for lists of addrs containing globbing chars (* and ?).
    7.50 -   We don't need valid RFC821 addresses here, just patterns to match against.
    7.51 +/*
    7.52 +**  Split the addrs at '@' into local_part and domain. Without an '@'
    7.53 +**  everything is local_part. Create address structs, which are put into a
    7.54 +**  list and returned.  This funktion is used for lists of addrs containing
    7.55 +**  globbing chars (* and ?).  We don't need valid RFC821 addresses here,
    7.56 +**  just patterns to match against.
    7.57  */
    7.58  static GList*
    7.59  parse_address_glob_list(gchar *line, gboolean read_file)
     8.1 --- a/src/connect.c	Thu Sep 22 15:07:40 2011 +0200
     8.2 +++ b/src/connect.c	Thu Oct 20 10:20:59 2011 +0200
     8.3 @@ -1,19 +1,20 @@
     8.4 -/*  MasqMail
     8.5 -    Copyright (C) 1999 Oliver Kurth
     8.6 -
     8.7 -    This program is free software; you can redistribute it and/or modify
     8.8 -    it under the terms of the GNU General Public License as published by
     8.9 -    the Free Software Foundation; either version 2 of the License, or
    8.10 -    (at your option) any later version.
    8.11 -
    8.12 -    This program is distributed in the hope that it will be useful,
    8.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    8.15 -    GNU General Public License for more details.
    8.16 -
    8.17 -    You should have received a copy of the GNU General Public License
    8.18 -    along with this program; if not, write to the Free Software
    8.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    8.20 +/*
    8.21 +**  MasqMail
    8.22 +**  Copyright (C) 1999 Oliver Kurth
    8.23 +**
    8.24 +**  This program is free software; you can redistribute it and/or modify
    8.25 +**  it under the terms of the GNU General Public License as published by
    8.26 +**  the Free Software Foundation; either version 2 of the License, or
    8.27 +**  (at your option) any later version.
    8.28 +**
    8.29 +**  This program is distributed in the hope that it will be useful,
    8.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    8.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    8.32 +**  GNU General Public License for more details.
    8.33 +**
    8.34 +**  You should have received a copy of the GNU General Public License
    8.35 +**  along with this program; if not, write to the Free Software
    8.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    8.37  */
    8.38  #include "masqmail.h"
    8.39  
    8.40 @@ -76,15 +77,15 @@
    8.41  	return NULL;
    8.42  }
    8.43  
    8.44 -/* Given a list of resolver functions, this function
    8.45 -   resolve the host and tries to connect to the addresses
    8.46 -   returned. If a connection attemp is timed out or refused,
    8.47 -   the next address is tried.
    8.48 -
    8.49 -   TODO: the resolver functions might return duplicate addresses,
    8.50 -   if attempt failed for one it should not be tried again.
    8.51 +/*
    8.52 +**  Given a list of resolver functions, this function
    8.53 +**  resolve the host and tries to connect to the addresses
    8.54 +**  returned. If a connection attemp is timed out or refused,
    8.55 +**  the next address is tried.
    8.56 +**
    8.57 +**  TODO: the resolver functions might return duplicate addresses,
    8.58 +**  if attempt failed for one it should not be tried again.
    8.59  */
    8.60 -
    8.61  mxip_addr*
    8.62  connect_resolvelist(int *psockfd, gchar *host, guint port, GList *res_func_list)
    8.63  {
    8.64 @@ -104,8 +105,11 @@
    8.65  			g_list_free(addr_list);
    8.66  			return addr;
    8.67  		}
    8.68 -		/* previous versions complained, until someone tried to use a hostname
    8.69 -		   out there that begins with a digit. eg. '3dwars.de'. */
    8.70 +		/*
    8.71 +		**  previous versions complained, until someone tried
    8.72 +		**  to use a hostname out there that begins with a
    8.73 +		**  digit. eg. '3dwars.de'.
    8.74 +		*/
    8.75  	}
    8.76  
    8.77  	if (res_func_list == NULL) {
     9.1 --- a/src/deliver.c	Thu Sep 22 15:07:40 2011 +0200
     9.2 +++ b/src/deliver.c	Thu Oct 20 10:20:59 2011 +0200
     9.3 @@ -1,20 +1,21 @@
     9.4 -/*  MasqMail
     9.5 -    Copyright (C) 1999-2002 Oliver Kurth
     9.6 -    Copyright (C) 2008, 2010 markus schnalke <meillo@marmaro.de>
     9.7 -
     9.8 -    This program is free software; you can redistribute it and/or modify
     9.9 -    it under the terms of the GNU General Public License as published by
    9.10 -    the Free Software Foundation; either version 2 of the License, or
    9.11 -    (at your option) any later version.
    9.12 -
    9.13 -    This program is distributed in the hope that it will be useful,
    9.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    9.16 -    GNU General Public License for more details.
    9.17 -
    9.18 -    You should have received a copy of the GNU General Public License
    9.19 -    along with this program; if not, write to the Free Software
    9.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    9.21 +/*
    9.22 +**  MasqMail
    9.23 +**  Copyright (C) 1999-2002 Oliver Kurth
    9.24 +**  Copyright (C) 2008, 2010 markus schnalke <meillo@marmaro.de>
    9.25 +**
    9.26 +**  This program is free software; you can redistribute it and/or modify
    9.27 +**  it under the terms of the GNU General Public License as published by
    9.28 +**  the Free Software Foundation; either version 2 of the License, or
    9.29 +**  (at your option) any later version.
    9.30 +**
    9.31 +**  This program is distributed in the hope that it will be useful,
    9.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
    9.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    9.34 +**  GNU General Public License for more details.
    9.35 +**
    9.36 +**  You should have received a copy of the GNU General Public License
    9.37 +**  along with this program; if not, write to the Free Software
    9.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    9.39  */
    9.40  
    9.41  #include <fnmatch.h>
    9.42 @@ -24,8 +25,11 @@
    9.43  #include "masqmail.h"
    9.44  #include "smtp_out.h"
    9.45  
    9.46 -/* collect failed/defered rcpts for failure/warning messages */
    9.47 -/* returns TRUE if either there are no failures or a failure message has been successfully sent */
    9.48 +/*
    9.49 +**  collect failed/defered rcpts for failure/warning messages
    9.50 +**  returns TRUE if either there are no failures or a failure message has
    9.51 +**  been successfully sent
    9.52 +*/
    9.53  gboolean
    9.54  delivery_failures(message *msg, GList *rcpt_list, gchar *err_fmt, ...)
    9.55  {
    9.56 @@ -173,9 +177,11 @@
    9.57  		address *ret_path = msg->return_path;
    9.58  		header *retpath_hdr, *envto_hdr;
    9.59  
    9.60 -		/* we need a private copy of the hdr list because we add headers
    9.61 -		   here that belong to the rcpt only. g_list_copy copies only
    9.62 -		   the nodes, so it is safe to g_list_free it */
    9.63 +		/*
    9.64 +		**  we need a private copy of the hdr list because we add
    9.65 +		**  headers here that belong to the rcpt only. g_list_copy
    9.66 +		**  copies only the nodes, so it is safe to g_list_free it
    9.67 +		*/
    9.68  		hdr_list = g_list_copy(msg->hdr_list);
    9.69  		retpath_hdr = create_header(HEAD_ENVELOPE_TO, "Envelope-to: %s\n", addr_string(env_addr));
    9.70  		envto_hdr = create_header(HEAD_RETURN_PATH, "Return-path: %s\n", addr_string(ret_path));
    9.71 @@ -184,8 +190,10 @@
    9.72  		hdr_list = g_list_prepend(hdr_list, retpath_hdr);
    9.73  
    9.74  		if (rcpt->local_part[0] == '|') {
    9.75 -			/* probably for expanded aliases, but why not done
    9.76 -			   like with the mda? //meillo 2010-12-06 */
    9.77 +			/*
    9.78 +			**  probably for expanded aliases, but why not done
    9.79 +			**  like with the mda? //meillo 2010-12-06
    9.80 +			*/
    9.81  			if (deliver_local_pipe(msg, hdr_list, rcpt, env_addr)) {
    9.82  				ok = TRUE;
    9.83  			}
    9.84 @@ -235,10 +243,13 @@
    9.85  	return ok;
    9.86  }
    9.87  
    9.88 -/* make a list of rcpt's of a message that are local
    9.89 -   return a new copy of the list */
    9.90 +/*
    9.91 +**  make a list of rcpt's of a message that are local
    9.92 +**  return a new copy of the list
    9.93 +*/
    9.94  void
    9.95 -msg_rcptlist_local(GList *rcpt_list, GList **p_local_list, GList **p_nonlocal_list)
    9.96 +msg_rcptlist_local(GList *rcpt_list, GList **p_local_list,
    9.97 +		GList **p_nonlocal_list)
    9.98  {
    9.99  	GList *rcpt_node;
   9.100  
   9.101 @@ -329,12 +340,14 @@
   9.102  	return ok;
   9.103  }
   9.104  
   9.105 -/* deliver list of messages to one host and finishes them if the message was
   9.106 -   delivered to at least one rcpt.
   9.107 -   Returns TRUE if at least one msg was delivered to at least one rcpt.
   9.108 +/*
   9.109 +**  deliver list of messages to one host and finishes them if the message was
   9.110 +**  delivered to at least one rcpt.
   9.111 +**  Returns TRUE if at least one msg was delivered to at least one rcpt.
   9.112  */
   9.113  gboolean
   9.114 -deliver_msglist_host_smtp(connect_route *route, GList *msgout_list, gchar *host, GList *res_list)
   9.115 +deliver_msglist_host_smtp(connect_route *route, GList *msgout_list,
   9.116 +		gchar *host, GList *res_list)
   9.117  {
   9.118  	gboolean ok = FALSE;
   9.119  	GList *msgout_node;
   9.120 @@ -477,7 +490,7 @@
   9.121  }
   9.122  
   9.123  /*
   9.124 -  delivers messages in msgout_list using route
   9.125 +** delivers messages in msgout_list using route
   9.126  */
   9.127  gboolean
   9.128  deliver_route_msgout_list(connect_route *route, GList *msgout_list)
   9.129 @@ -501,11 +514,12 @@
   9.130  		return FALSE;
   9.131  	}
   9.132  
   9.133 -	/* TODO: It would be nice to be able to fork for each host.
   9.134 -	   We cannot do that yet because of complications with finishing the
   9.135 -	   messages. Threads could be a solution because they use the same
   9.136 -	   memory. But we are not thread safe yet...
   9.137 -	 */
   9.138 +	/*
   9.139 +	**  TODO: It would be nice to be able to fork for each host.
   9.140 +	**  We cannot do that yet because of complications with finishing the
   9.141 +	**  messages. Threads could be a solution because they use the same
   9.142 +	**  memory. But we are not thread safe yet...
   9.143 +	*/
   9.144  	foreach(mo_ph_list, mo_ph_node) {
   9.145  		msgout_perhost *mo_ph = (msgout_perhost *) (mo_ph_node->data);
   9.146  		if (deliver_msglist_host(route, mo_ph->msgout_list, mo_ph->host, route->resolve_list)) {
   9.147 @@ -518,8 +532,9 @@
   9.148  }
   9.149  
   9.150  /*
   9.151 -  calls route_prepare_msg()
   9.152 -  delivers messages in msg_list using route by calling deliver_route_msgout_list()
   9.153 +** calls route_prepare_msg()
   9.154 +** delivers messages in msg_list using route by calling
   9.155 +** deliver_route_msgout_list()
   9.156  */
   9.157  gboolean
   9.158  deliver_route_msg_list(connect_route *route, GList *msgout_list)
   9.159 @@ -536,12 +551,16 @@
   9.160  		GList *rcpt_list_non_delivered = NULL;
   9.161  		GList *rcpt_node;
   9.162  
   9.163 -		/* we have to delete already delivered rcpt's because a
   9.164 -		   previous route may have delivered to it */
   9.165 +		/*
   9.166 +		**  we have to delete already delivered rcpt's because a
   9.167 +		**  previous route may have delivered to it
   9.168 +		*/
   9.169  		foreach(msgout_cloned->rcpt_list, rcpt_node) {
   9.170  			address *rcpt = (address *) (rcpt_node->data);
   9.171 -			/* failed addresses already have been bounced;
   9.172 -			   there should be a better way to handle those. */
   9.173 +			/*
   9.174 +			**  failed addresses already have been bounced;
   9.175 +			**  there should be a better way to handle those.
   9.176 +			*/
   9.177  			if (!addr_is_delivered(rcpt) && !addr_is_failed(rcpt)
   9.178  			    && !(rcpt->flags & ADDR_FLAG_LAST_ROUTE)) {
   9.179  				rcpt_list_non_delivered = g_list_append(rcpt_list_non_delivered, rcpt);
   9.180 @@ -596,8 +615,9 @@
   9.181  	return ok;
   9.182  }
   9.183  
   9.184 -/* copy pointers of delivered addresses to the msg's non_rcpt_list,
   9.185 -   to make sure that they will not be delivered again.
   9.186 +/*
   9.187 +**  copy pointers of delivered addresses to the msg's non_rcpt_list,
   9.188 +**  to make sure that they will not be delivered again.
   9.189  */
   9.190  void
   9.191  update_non_rcpt_list(msg_out *msgout)
   9.192 @@ -613,12 +633,13 @@
   9.193  	}
   9.194  }
   9.195  
   9.196 -/* after delivery attempts, we check if there are any rcpt addresses left in
   9.197 -   the message. If all addresses have been completed, the spool files will be
   9.198 -   deleted, otherwise the header spool will be written back. We never changed
   9.199 -   the data spool, so there is no need to write that back.
   9.200 -
   9.201 -   returns TRUE if all went well.
   9.202 +/*
   9.203 +**  after delivery attempts, we check if there are any rcpt addresses left in
   9.204 +**  the message. If all addresses have been completed, the spool files will be
   9.205 +**  deleted, otherwise the header spool will be written back. We never changed
   9.206 +**  the data spool, so there is no need to write that back.
   9.207 +**
   9.208 +**  returns TRUE if all went well.
   9.209  */
   9.210  gboolean
   9.211  deliver_finish(msg_out *msgout)
   9.212 @@ -629,18 +650,21 @@
   9.213  
   9.214  	update_non_rcpt_list(msgout);
   9.215  
   9.216 -	/* we NEVER made copies of the addresses, flags affecting addresses
   9.217 -	   were always set on the original address structs */
   9.218 +	/*
   9.219 +	**  we NEVER made copies of the addresses, flags affecting addresses
   9.220 +	**  were always set on the original address structs
   9.221 +	*/
   9.222  	foreach(msg->rcpt_list, rcpt_node) {
   9.223  		address *rcpt = (address *) (rcpt_node->data);
   9.224  		if (!addr_is_finished_children(rcpt)) {
   9.225  			finished = FALSE;
   9.226  		} else {
   9.227 -			/* if ALL children have been delivered, mark parent as
   9.228 -			   delivered. if there is one or more not delivered,
   9.229 -			   it must have failed, we mark the parent as failed
   9.230 -			   as well.
   9.231 -			 */
   9.232 +			/*
   9.233 +			**  if ALL children have been delivered, mark parent as
   9.234 +			**  delivered. if there is one or more not delivered,
   9.235 +			**  it must have failed, we mark the parent as failed
   9.236 +			**  as well.
   9.237 +			*/
   9.238  			if (addr_is_delivered_children(rcpt)) {
   9.239  				addr_mark_delivered(rcpt);
   9.240  			} else {
   9.241 @@ -728,8 +752,8 @@
   9.242  }
   9.243  
   9.244  /*
   9.245 -   This function splits the list of rcpt addresses
   9.246 -   into local and remote addresses and processes them accordingly.
   9.247 +**  This function splits the list of rcpt addresses
   9.248 +**  into local and remote addresses and processes them accordingly.
   9.249  */
   9.250  gboolean
   9.251  deliver_msg_list(GList *msg_list, guint flags)
   9.252 @@ -839,10 +863,10 @@
   9.253  }
   9.254  
   9.255  /*
   9.256 -   deliver() is called when a message has just been received
   9.257 -   (mode_accept and smtp_in) and should be delivered immediately
   9.258 -   (neither -odq nor do_queue). Only this one message will be tried to
   9.259 -   deliver then.
   9.260 +**  deliver() is called when a message has just been received
   9.261 +**  (mode_accept and smtp_in) and should be delivered immediately
   9.262 +**  (neither -odq nor do_queue). Only this one message will be tried to
   9.263 +**  deliver then.
   9.264  */
   9.265  gboolean
   9.266  deliver(message *msg)
    10.1 --- a/src/dotlock.c	Thu Sep 22 15:07:40 2011 +0200
    10.2 +++ b/src/dotlock.c	Thu Oct 20 10:20:59 2011 +0200
    10.3 @@ -1,19 +1,20 @@
    10.4 -/*  MasqMail
    10.5 -    Copyright (C) 2001 Oliver Kurth
    10.6 -
    10.7 -    This program is free software; you can redistribute it and/or modify
    10.8 -    it under the terms of the GNU General Public License as published by
    10.9 -    the Free Software Foundation; either version 2 of the License, or
   10.10 -    (at your option) any later version.
   10.11 -
   10.12 -    This program is distributed in the hope that it will be useful,
   10.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10.15 -    GNU General Public License for more details.
   10.16 -
   10.17 -    You should have received a copy of the GNU General Public License
   10.18 -    along with this program; if not, write to the Free Software
   10.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   10.20 +/*
   10.21 +**  MasqMail
   10.22 +**  Copyright (C) 2001 Oliver Kurth
   10.23 +**
   10.24 +**  This program is free software; you can redistribute it and/or modify
   10.25 +**  it under the terms of the GNU General Public License as published by
   10.26 +**  the Free Software Foundation; either version 2 of the License, or
   10.27 +**  (at your option) any later version.
   10.28 +**
   10.29 +**  This program is distributed in the hope that it will be useful,
   10.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   10.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10.32 +**  GNU General Public License for more details.
   10.33 +**
   10.34 +**  You should have received a copy of the GNU General Public License
   10.35 +**  along with this program; if not, write to the Free Software
   10.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   10.37  */
   10.38  
   10.39  #include <glib.h>
    11.1 --- a/src/dotlock.h	Thu Sep 22 15:07:40 2011 +0200
    11.2 +++ b/src/dotlock.h	Thu Oct 20 10:20:59 2011 +0200
    11.3 @@ -1,19 +1,20 @@
    11.4 -/*  MasqMail
    11.5 -    Copyright (C) 2001 Oliver Kurth
    11.6 -
    11.7 -    This program is free software; you can redistribute it and/or modify
    11.8 -    it under the terms of the GNU General Public License as published by
    11.9 -    the Free Software Foundation; either version 2 of the License, or
   11.10 -    (at your option) any later version.
   11.11 -
   11.12 -    This program is distributed in the hope that it will be useful,
   11.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11.15 -    GNU General Public License for more details.
   11.16 -
   11.17 -    You should have received a copy of the GNU General Public License
   11.18 -    along with this program; if not, write to the Free Software
   11.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   11.20 +/*
   11.21 +**  MasqMail
   11.22 +**  Copyright (C) 2001 Oliver Kurth
   11.23 +**
   11.24 +**  This program is free software; you can redistribute it and/or modify
   11.25 +**  it under the terms of the GNU General Public License as published by
   11.26 +**  the Free Software Foundation; either version 2 of the License, or
   11.27 +**  (at your option) any later version.
   11.28 +**
   11.29 +**  This program is distributed in the hope that it will be useful,
   11.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   11.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   11.32 +**  GNU General Public License for more details.
   11.33 +**
   11.34 +**  You should have received a copy of the GNU General Public License
   11.35 +**  along with this program; if not, write to the Free Software
   11.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   11.37  */
   11.38  
   11.39  #define MAX_LOCKAGE 300
    12.1 --- a/src/expand.c	Thu Sep 22 15:07:40 2011 +0200
    12.2 +++ b/src/expand.c	Thu Oct 20 10:20:59 2011 +0200
    12.3 @@ -1,19 +1,20 @@
    12.4 -/*  MasqMail
    12.5 -    Copyright (C) 2000-2001 Oliver Kurth
    12.6 -
    12.7 -    This program is free software; you can redistribute it and/or modify
    12.8 -    it under the terms of the GNU General Public License as published by
    12.9 -    the Free Software Foundation; either version 2 of the License, or
   12.10 -    (at your option) any later version.
   12.11 -
   12.12 -    This program is distributed in the hope that it will be useful,
   12.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12.15 -    GNU General Public License for more details.
   12.16 -
   12.17 -    You should have received a copy of the GNU General Public License
   12.18 -    along with this program; if not, write to the Free Software
   12.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   12.20 +/*
   12.21 +**  MasqMail
   12.22 +**  Copyright (C) 2000-2001 Oliver Kurth
   12.23 +**
   12.24 +**  This program is free software; you can redistribute it and/or modify
   12.25 +**  it under the terms of the GNU General Public License as published by
   12.26 +**  the Free Software Foundation; either version 2 of the License, or
   12.27 +**  (at your option) any later version.
   12.28 +**
   12.29 +**  This program is distributed in the hope that it will be useful,
   12.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   12.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12.32 +**  GNU General Public License for more details.
   12.33 +**
   12.34 +**  You should have received a copy of the GNU General Public License
   12.35 +**  along with this program; if not, write to the Free Software
   12.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   12.37  */
   12.38  
   12.39  #include "masqmail.h"
    13.1 --- a/src/fail_msg.c	Thu Sep 22 15:07:40 2011 +0200
    13.2 +++ b/src/fail_msg.c	Thu Oct 20 10:20:59 2011 +0200
    13.3 @@ -1,20 +1,21 @@
    13.4 -/*  MasqMail
    13.5 -    Copyright (C) 2000-2001 Oliver Kurth
    13.6 - *
    13.7 - * This program is free software; you can redistribute it and/or modify
    13.8 - * it under the terms of the GNU General Public License as published by
    13.9 - * the Free Software Foundation; either version 2 of the License, or
   13.10 - * (at your option) any later version.
   13.11 - *
   13.12 - * This program is distributed in the hope that it will be useful,
   13.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13.15 - * GNU General Public License for more details.
   13.16 - *
   13.17 - * You should have received a copy of the GNU General Public License
   13.18 - * along with this program; if not, write to the Free Software
   13.19 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   13.20 - */
   13.21 +/*
   13.22 +**  MasqMail
   13.23 +**  Copyright (C) 2000-2001 Oliver Kurth
   13.24 +**
   13.25 +**  This program is free software; you can redistribute it and/or modify
   13.26 +**  it under the terms of the GNU General Public License as published by
   13.27 +**  the Free Software Foundation; either version 2 of the License, or
   13.28 +**  (at your option) any later version.
   13.29 +**
   13.30 +**  This program is distributed in the hope that it will be useful,
   13.31 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   13.32 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13.33 +**  GNU General Public License for more details.
   13.34 +**
   13.35 +**  You should have received a copy of the GNU General Public License
   13.36 +**  along with this program; if not, write to the Free Software
   13.37 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   13.38 +*/
   13.39  
   13.40  #include <sys/wait.h>
   13.41  
   13.42 @@ -23,7 +24,8 @@
   13.43  #include "readsock.h"
   13.44  
   13.45  gboolean
   13.46 -fail_msg(message *msg, gchar *template, GList *failed_rcpts, gchar *err_fmt, va_list args)
   13.47 +fail_msg(message *msg, gchar *template, GList *failed_rcpts, gchar *err_fmt,
   13.48 +		va_list args)
   13.49  {
   13.50  	gboolean ok = FALSE;
   13.51  	address *ret_path = NULL;
   13.52 @@ -124,11 +126,10 @@
   13.53  }
   13.54  
   13.55  /*
   13.56 -ival  : |--|--|----|--------|--------|
   13.57 -warned: |-------W-------------W------
   13.58 -result: |nnnyyyynnnnyyyyyyyyyynnnnnnn
   13.59 +**  ival  : |--|--|----|--------|--------|
   13.60 +**  warned: |-------W-------------W------
   13.61 +**  result: |nnnyyyynnnnyyyyyyyyyynnnnnnn
   13.62  */
   13.63 -
   13.64  static gboolean
   13.65  warn_msg_is_due(message *msg)
   13.66  {
   13.67 @@ -155,7 +156,8 @@
   13.68  }
   13.69  
   13.70  gboolean
   13.71 -warn_msg(message *msg, gchar *template, GList *defered_rcpts, gchar *err_fmt, va_list args)
   13.72 +warn_msg(message *msg, gchar *template, GList *defered_rcpts, gchar *err_fmt,
   13.73 +		va_list args)
   13.74  {
   13.75  	time_t now = time(NULL);
   13.76  
    14.1 --- a/src/header.c	Thu Sep 22 15:07:40 2011 +0200
    14.2 +++ b/src/header.c	Thu Oct 20 10:20:59 2011 +0200
    14.3 @@ -1,19 +1,20 @@
    14.4 -/*  MasqMail
    14.5 -    Copyright (C) 2000 Oliver Kurth
    14.6 -
    14.7 -    This program is free software; you can redistribute it and/or modify
    14.8 -    it under the terms of the GNU General Public License as published by
    14.9 -    the Free Software Foundation; either version 2 of the License, or
   14.10 -    (at your option) any later version.
   14.11 -
   14.12 -    This program is distributed in the hope that it will be useful,
   14.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   14.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14.15 -    GNU General Public License for more details.
   14.16 -
   14.17 -    You should have received a copy of the GNU General Public License
   14.18 -    along with this program; if not, write to the Free Software
   14.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   14.20 +/*
   14.21 +**  MasqMail
   14.22 +**  Copyright (C) 2000 Oliver Kurth
   14.23 +**
   14.24 +**  This program is free software; you can redistribute it and/or modify
   14.25 +**  it under the terms of the GNU General Public License as published by
   14.26 +**  the Free Software Foundation; either version 2 of the License, or
   14.27 +**  (at your option) any later version.
   14.28 +**
   14.29 +**  This program is distributed in the hope that it will be useful,
   14.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   14.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14.32 +**  GNU General Public License for more details.
   14.33 +**
   14.34 +**  You should have received a copy of the GNU General Public License
   14.35 +**  along with this program; if not, write to the Free Software
   14.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   14.37  */
   14.38  #include "masqmail.h"
   14.39  
   14.40 @@ -66,9 +67,10 @@
   14.41  	return buf;
   14.42  }
   14.43  
   14.44 -/* finds list of headers matching id
   14.45 -   if id == HEAD_UNKNOWN and header == NULL finds all unknown headers
   14.46 -   else finds all headers matching header
   14.47 +/*
   14.48 +**  finds list of headers matching id
   14.49 +**  if id == HEAD_UNKNOWN and header == NULL finds all unknown headers
   14.50 +**  else finds all headers matching header
   14.51  */
   14.52  GList*
   14.53  find_header(GList *hdr_list, header_id id, gchar *hdr_str)
   14.54 @@ -129,8 +131,8 @@
   14.55  }
   14.56  
   14.57  /*
   14.58 -   fold the header at maxlen chars (newline excluded)
   14.59 -   (We exclude the newline because the RFCs deal with it this way)
   14.60 +**  fold the header at maxlen chars (newline excluded)
   14.61 +**  (We exclude the newline because the RFCs deal with it this way)
   14.62  */
   14.63  void
   14.64  header_fold(header *hdr, unsigned int maxlen)
   14.65 @@ -155,9 +157,11 @@
   14.66  	}
   14.67  	printf("stripped len: %d\n", len);
   14.68  
   14.69 -	/* FIXME: would be nice to have a better size calculation */
   14.70 -	/* (the current size + what we insert as break, twice as often as
   14.71 -	    we have breaks in the optimal case) */
   14.72 +	/*
   14.73 +	**  FIXME: would be nice to have a better size calculation
   14.74 +	**  (the current size + what we insert as break, twice as often as
   14.75 +	**  we have breaks in the optimal case)
   14.76 +	*/
   14.77  	tmp = malloc(len + 2 * (len/maxlen) * strlen("\n\t"));
   14.78  	dest = tmp;
   14.79  
   14.80 @@ -223,8 +227,10 @@
   14.81  	hdr->header = g_strdup_vprintf(fmt, args);
   14.82  	hdr->value = NULL;
   14.83  
   14.84 -	/* value shall point to the first non-whitespace char in the
   14.85 -	   value part of the header line (i.e. after the first colon) */
   14.86 +	/*
   14.87 +	**  value shall point to the first non-whitespace char in the
   14.88 +	**  value part of the header line (i.e. after the first colon)
   14.89 +	*/
   14.90  	p = strchr(hdr->header, ':');
   14.91  	if (p) {
   14.92  		p++;
   14.93 @@ -292,8 +298,10 @@
   14.94  		p++;
   14.95  	}
   14.96  	hdr->value = p;
   14.97 -	/* Note: an empty value can also mean that it's only the first part
   14.98 -	         of a folded header line */
   14.99 +	/*
  14.100 +	**  Note: an empty value can also mean that it's only the first part
  14.101 +	**  of a folded header line
  14.102 +	*/
  14.103  
  14.104  	for (i = 0; i < HEAD_NUM_IDS; i++) {
  14.105  		if (strcasecmp(header_names[i].header, buf) == 0) {
    15.1 --- a/src/interface.c	Thu Sep 22 15:07:40 2011 +0200
    15.2 +++ b/src/interface.c	Thu Oct 20 10:20:59 2011 +0200
    15.3 @@ -1,25 +1,26 @@
    15.4 -/*  MasqMail
    15.5 -    Copyright (C) 2000 Oliver Kurth
    15.6 -
    15.7 -    This program is free software; you can redistribute it and/or modify
    15.8 -    it under the terms of the GNU General Public License as published by
    15.9 -    the Free Software Foundation; either version 2 of the License, or
   15.10 -    (at your option) any later version.
   15.11 -
   15.12 -    This program is distributed in the hope that it will be useful,
   15.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   15.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15.15 -    GNU General Public License for more details.
   15.16 -
   15.17 -    You should have received a copy of the GNU General Public License
   15.18 -    along with this program; if not, write to the Free Software
   15.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   15.20 +/*
   15.21 +**  MasqMail
   15.22 +**  Copyright (C) 2000 Oliver Kurth
   15.23 +**
   15.24 +**  This program is free software; you can redistribute it and/or modify
   15.25 +**  it under the terms of the GNU General Public License as published by
   15.26 +**  the Free Software Foundation; either version 2 of the License, or
   15.27 +**  (at your option) any later version.
   15.28 +**
   15.29 +**  This program is distributed in the hope that it will be useful,
   15.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   15.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   15.32 +**  GNU General Public License for more details.
   15.33 +**
   15.34 +**  You should have received a copy of the GNU General Public License
   15.35 +**  along with this program; if not, write to the Free Software
   15.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   15.37  */
   15.38  
   15.39  #include "masqmail.h"
   15.40  
   15.41  /* define if you get problems... */
   15.42 -/*#define SOCKADDR_OLD 1*/
   15.43 +/* #define SOCKADDR_OLD 1 */
   15.44  
   15.45  gboolean
   15.46  init_sockaddr(struct sockaddr_in *name, interface *iface)
    16.1 --- a/src/listen.c	Thu Sep 22 15:07:40 2011 +0200
    16.2 +++ b/src/listen.c	Thu Oct 20 10:20:59 2011 +0200
    16.3 @@ -1,19 +1,20 @@
    16.4 -/*  MasqMail
    16.5 -    Copyright (C) 1999/2000 Oliver Kurth
    16.6 -
    16.7 -    This program is free software; you can redistribute it and/or modify
    16.8 -    it under the terms of the GNU General Public License as published by
    16.9 -    the Free Software Foundation; either version 2 of the License, or
   16.10 -    (at your option) any later version.
   16.11 -
   16.12 -    This program is distributed in the hope that it will be useful,
   16.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   16.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16.15 -    GNU General Public License for more details.
   16.16 -
   16.17 -    You should have received a copy of the GNU General Public License
   16.18 -    along with this program; if not, write to the Free Software
   16.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   16.20 +/*
   16.21 +**  MasqMail
   16.22 +**  Copyright (C) 1999/2000 Oliver Kurth
   16.23 +**
   16.24 +**  This program is free software; you can redistribute it and/or modify
   16.25 +**  it under the terms of the GNU General Public License as published by
   16.26 +**  the Free Software Foundation; either version 2 of the License, or
   16.27 +**  (at your option) any later version.
   16.28 +**
   16.29 +**  This program is distributed in the hope that it will be useful,
   16.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   16.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16.32 +**  GNU General Public License for more details.
   16.33 +**
   16.34 +**  You should have received a copy of the GNU General Public License
   16.35 +**  along with this program; if not, write to the Free Software
   16.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   16.37  */
   16.38  
   16.39  #include <sys/wait.h>
   16.40 @@ -141,10 +142,12 @@
   16.41  
   16.42  	while (1) {
   16.43  
   16.44 -		/* if we were interrupted by an incoming connection (or a signal)
   16.45 -		   we have to recalculate the time until the next queue run should
   16.46 -		   occur. select may put a value into tm, but doc for select() says
   16.47 -		   we should not use it. */
   16.48 +		/*
   16.49 +		**  if we were interrupted by an incoming connection (or a
   16.50 +		**  signal) we have to recalculate the time until the next
   16.51 +		**  queue run should occur. select may put a value into tm,
   16.52 +		**  but doc for select() says we should not use it.
   16.53 +		*/
   16.54  		if (qival > 0) {
   16.55  			time(&time_now);
   16.56  			if (sel_ret == 0) {  /* we are either just starting or did a queue run */
   16.57 @@ -160,8 +163,11 @@
   16.58  					tm.tv_sec = 0;
   16.59  			}
   16.60  		}
   16.61 -		/* Block until input arrives on one or more active sockets,
   16.62 -		   or signal arrives, or queuing interval time elapsed (if qival > 0) */
   16.63 +		/*
   16.64 +		**  Block until input arrives on one or more active sockets,
   16.65 +		**  or signal arrives, or queuing interval time elapsed
   16.66 +		**  (if qival > 0)
   16.67 +		*/
   16.68  		read_fd_set = active_fd_set;
   16.69  		if ((sel_ret = select(FD_SETSIZE, &read_fd_set, NULL, NULL, qival > 0 ? &tm : NULL)) < 0) {
   16.70  			if (errno != EINTR) {
   16.71 @@ -194,8 +200,10 @@
   16.72  				}
   16.73  			}
   16.74  		} else {
   16.75 -			/* If select returns 0, the interval time has elapsed.
   16.76 -			   We start a new queue runner process */
   16.77 +			/*
   16.78 +			**  If select returns 0, the interval time has elapsed.
   16.79 +			**  We start a new queue runner process
   16.80 +			*/
   16.81  			int pid;
   16.82  			signal(SIGCHLD, sigchld_handler);
   16.83  			if ((pid = fork()) == 0) {
    17.1 --- a/src/local.c	Thu Sep 22 15:07:40 2011 +0200
    17.2 +++ b/src/local.c	Thu Oct 20 10:20:59 2011 +0200
    17.3 @@ -1,20 +1,21 @@
    17.4 -/*  MasqMail
    17.5 -    Copyright (C) 1999-2001 Oliver Kurth
    17.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    17.7 -
    17.8 -    This program is free software; you can redistribute it and/or modify
    17.9 -    it under the terms of the GNU General Public License as published by
   17.10 -    the Free Software Foundation; either version 2 of the License, or
   17.11 -    (at your option) any later version.
   17.12 -
   17.13 -    This program is distributed in the hope that it will be useful,
   17.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   17.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17.16 -    GNU General Public License for more details.
   17.17 -
   17.18 -    You should have received a copy of the GNU General Public License
   17.19 -    along with this program; if not, write to the Free Software
   17.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   17.21 +/*
   17.22 +**  MasqMail
   17.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   17.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   17.25 +**
   17.26 +**  This program is free software; you can redistribute it and/or modify
   17.27 +**  it under the terms of the GNU General Public License as published by
   17.28 +**  the Free Software Foundation; either version 2 of the License, or
   17.29 +**  (at your option) any later version.
   17.30 +**
   17.31 +**  This program is distributed in the hope that it will be useful,
   17.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   17.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17.34 +**  GNU General Public License for more details.
   17.35 +**
   17.36 +**  You should have received a copy of the GNU General Public License
   17.37 +**  along with this program; if not, write to the Free Software
   17.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   17.39  */
   17.40  
   17.41  #include <sys/wait.h>
   17.42 @@ -131,10 +132,12 @@
   17.43  	}
   17.44  
   17.45  	if (!uid_ok || !gid_ok) {
   17.46 -		/* FIXME: if this fails we HAVE to exit, because we shall not run
   17.47 -		   with some users id. But we do not return, and so this message
   17.48 -		   will not be finished, so the user will get the message again
   17.49 -		   next time a delivery is attempted... */
   17.50 +		/*
   17.51 +		**  FIXME: if this fails we HAVE to exit, because we shall
   17.52 +		**  not run with some users id. But we do not return, and so
   17.53 +		**  this message will not be finished, so the user will get
   17.54 +		**  the message again next time a delivery is attempted...
   17.55 +		*/
   17.56  		logwrite(LOG_ALERT, "could not set back uid or gid after local delivery: %s\n", strerror(errno));
   17.57  		logwrite(LOG_ALERT, "uid=%d, gid=%d, euid=%d, egid=%d, want = %d, %d\n",
   17.58  		         getuid(), getgid(), geteuid(), getegid(), saved_uid, saved_gid);
    18.1 --- a/src/log.c	Thu Sep 22 15:07:40 2011 +0200
    18.2 +++ b/src/log.c	Thu Oct 20 10:20:59 2011 +0200
    18.3 @@ -1,19 +1,20 @@
    18.4 -/*  MasqMail
    18.5 -    Copyright (C) 1999-2001 Oliver Kurth
    18.6 -
    18.7 -    This program is free software; you can redistribute it and/or modify
    18.8 -    it under the terms of the GNU General Public License as published by
    18.9 -    the Free Software Foundation; either version 2 of the License, or
   18.10 -    (at your option) any later version.
   18.11 -
   18.12 -    This program is distributed in the hope that it will be useful,
   18.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   18.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18.15 -    GNU General Public License for more details.
   18.16 -
   18.17 -    You should have received a copy of the GNU General Public License
   18.18 -    along with this program; if not, write to the Free Software
   18.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   18.20 +/*
   18.21 +**  MasqMail
   18.22 +**  Copyright (C) 1999-2001 Oliver Kurth
   18.23 +**
   18.24 +**  This program is free software; you can redistribute it and/or modify
   18.25 +**  it under the terms of the GNU General Public License as published by
   18.26 +**  the Free Software Foundation; either version 2 of the License, or
   18.27 +**  (at your option) any later version.
   18.28 +**
   18.29 +**  This program is distributed in the hope that it will be useful,
   18.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   18.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18.32 +**  GNU General Public License for more details.
   18.33 +**
   18.34 +**  You should have received a copy of the GNU General Public License
   18.35 +**  along with this program; if not, write to the Free Software
   18.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   18.37  */
   18.38  
   18.39  #include <sysexits.h>
    19.1 --- a/src/lookup.c	Thu Sep 22 15:07:40 2011 +0200
    19.2 +++ b/src/lookup.c	Thu Oct 20 10:20:59 2011 +0200
    19.3 @@ -1,21 +1,22 @@
    19.4 -/* MasqMail
    19.5 - * Copyright (C) Oliver Kurth
    19.6 - * Copyright (C) markus schnalke <meillo@marmaro.de>
    19.7 - *
    19.8 - * This program is free software; you can redistribute it and/or modify
    19.9 - * it under the terms of the GNU General Public License as published by
   19.10 - * the Free Software Foundation; either version 2 of the License, or
   19.11 - * (at your option) any later version.
   19.12 - *
   19.13 - * This program is distributed in the hope that it will be useful,
   19.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   19.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   19.16 - * GNU General Public License for more details.
   19.17 - *
   19.18 - * You should have received a copy of the GNU General Public License
   19.19 - * along with this program; if not, write to the Free Software
   19.20 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   19.21 - */
   19.22 +/*
   19.23 +**  MasqMail
   19.24 +**  Copyright (C) Oliver Kurth
   19.25 +**  Copyright (C) markus schnalke <meillo@marmaro.de>
   19.26 +**
   19.27 +**  This program is free software; you can redistribute it and/or modify
   19.28 +**  it under the terms of the GNU General Public License as published by
   19.29 +**  the Free Software Foundation; either version 2 of the License, or
   19.30 +**  (at your option) any later version.
   19.31 +**
   19.32 +**  This program is distributed in the hope that it will be useful,
   19.33 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   19.34 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   19.35 +**  GNU General Public License for more details.
   19.36 +**
   19.37 +**  You should have received a copy of the GNU General Public License
   19.38 +**  along with this program; if not, write to the Free Software
   19.39 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   19.40 +*/
   19.41  
   19.42  #include <sys/types.h>
   19.43  #include <netinet/in.h>
   19.44 @@ -64,10 +65,10 @@
   19.45  
   19.46  	if (resp_len <= 0) {
   19.47  		/*
   19.48 -		   if (errno == ECONNREFUSED) return DNS_SOFT;
   19.49 -		   if (h_errno == TRY_AGAIN) return DNS_SOFT;
   19.50 -		   return DNS_HARD;
   19.51 -		 */
   19.52 +		**  if (errno == ECONNREFUSED) return DNS_SOFT;
   19.53 +		**  if (h_errno == TRY_AGAIN) return DNS_SOFT;
   19.54 +		**  return DNS_HARD;
   19.55 +		*/
   19.56  		return -1;
   19.57  	}
   19.58  	if (resp_len >= sizeof(response))
   19.59 @@ -257,10 +258,11 @@
   19.60  
   19.61  		DEBUG(5) debugf("DNS: found %d mx records\n", cnt);
   19.62  
   19.63 -		/* to randomize sequences with equal pref values,
   19.64 -		   we temporarily 'misused' the ip field and
   19.65 -		   put a random number in it as a secondary sort key.
   19.66 -		 */
   19.67 +		/*
   19.68 +		**  to randomize sequences with equal pref values,
   19.69 +		**  we temporarily 'misused' the ip field and
   19.70 +		**  put a random number in it as a secondary sort key.
   19.71 +		*/
   19.72  		list = g_list_sort(list, _mx_sort_func);
   19.73  
   19.74  		/* CNAME resolving has to be added as well. */
    20.1 --- a/src/lookup.h	Thu Sep 22 15:07:40 2011 +0200
    20.2 +++ b/src/lookup.h	Thu Oct 20 10:20:59 2011 +0200
    20.3 @@ -1,20 +1,21 @@
    20.4 -/* MasqMail
    20.5 - * Copyright (C) Oliver Kurth,
    20.6 - *
    20.7 - * This program is free software; you can redistribute it and/or modify
    20.8 - * it under the terms of the GNU General Public License as published by
    20.9 - * the Free Software Foundation; either version 2 of the License, or
   20.10 - * (at your option) any later version.
   20.11 - *
   20.12 - * This program is distributed in the hope that it will be useful,
   20.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   20.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20.15 - * GNU General Public License for more details.
   20.16 - *
   20.17 - * You should have received a copy of the GNU General Public License
   20.18 - * along with this program; if not, write to the Free Software
   20.19 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   20.20 - */
   20.21 +/*
   20.22 +**  MasqMail
   20.23 +**  Copyright (C) Oliver Kurth,
   20.24 +**
   20.25 +**  This program is free software; you can redistribute it and/or modify
   20.26 +**  it under the terms of the GNU General Public License as published by
   20.27 +**  the Free Software Foundation; either version 2 of the License, or
   20.28 +**  (at your option) any later version.
   20.29 +**
   20.30 +**  This program is distributed in the hope that it will be useful,
   20.31 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   20.32 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20.33 +**  GNU General Public License for more details.
   20.34 +**
   20.35 +**  You should have received a copy of the GNU General Public License
   20.36 +**  along with this program; if not, write to the Free Software
   20.37 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   20.38 +*/
   20.39  
   20.40  #define MAX_DNSNAME MAXDNAME
   20.41  
    21.1 --- a/src/masqmail.c	Thu Sep 22 15:07:40 2011 +0200
    21.2 +++ b/src/masqmail.c	Thu Oct 20 10:20:59 2011 +0200
    21.3 @@ -1,20 +1,21 @@
    21.4 -/*  MasqMail
    21.5 -    Copyright (C) 1999-2001 Oliver Kurth
    21.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    21.7 -
    21.8 -    This program is free software; you can redistribute it and/or modify
    21.9 -    it under the terms of the GNU General Public License as published by
   21.10 -    the Free Software Foundation; either version 2 of the License, or
   21.11 -    (at your option) any later version.
   21.12 -
   21.13 -    This program is distributed in the hope that it will be useful,
   21.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   21.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   21.16 -    GNU General Public License for more details.
   21.17 -
   21.18 -    You should have received a copy of the GNU General Public License
   21.19 -    along with this program; if not, write to the Free Software
   21.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   21.21 +/*
   21.22 +**  MasqMail
   21.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   21.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   21.25 +**
   21.26 +**  This program is free software; you can redistribute it and/or modify
   21.27 +**  it under the terms of the GNU General Public License as published by
   21.28 +**  the Free Software Foundation; either version 2 of the License, or
   21.29 +**  (at your option) any later version.
   21.30 +**
   21.31 +**  This program is distributed in the hope that it will be useful,
   21.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   21.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   21.34 +**  GNU General Public License for more details.
   21.35 +**
   21.36 +**  You should have received a copy of the GNU General Public License
   21.37 +**  along with this program; if not, write to the Free Software
   21.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   21.39  */
   21.40  
   21.41  #include <stdio.h>
   21.42 @@ -34,9 +35,11 @@
   21.43  
   21.44  #include "masqmail.h"
   21.45  
   21.46 -/* mutually exclusive modes. Note that there is no 'queue daemon' mode.
   21.47 -   It, as well as the distinction beween the two (non exclusive) daemon
   21.48 -   (queue and listen) modes, is handled by flags.*/
   21.49 +/*
   21.50 +**  mutually exclusive modes. Note that there is no 'queue daemon' mode.
   21.51 +**  It, as well as the distinction beween the two (non exclusive) daemon
   21.52 +**  (queue and listen) modes, is handled by flags.
   21.53 +*/
   21.54  enum mta_mode {
   21.55  	MODE_NONE = 0,  /* to check if a mode was set */
   21.56  	MODE_ACCEPT,  /* accept message on stdin (fallback mode) */
   21.57 @@ -95,11 +98,11 @@
   21.58  #endif
   21.59  
   21.60  /*
   21.61 -argv: the original argv
   21.62 -argp: number of arg (may get modified!)
   21.63 -cp: pointing to the char after the option
   21.64 -    e.g.  `-d 6'     `-d6'
   21.65 -             ^          ^
   21.66 +**  argv: the original argv
   21.67 +**  argp: number of arg (may get modified!)
   21.68 +**  cp: pointing to the char after the option
   21.69 +**    e.g.  `-d 6'     `-d6'
   21.70 +**             ^          ^
   21.71  */
   21.72  gchar*
   21.73  get_optarg(char *argv[], gint *argp, char *cp)
   21.74 @@ -161,9 +164,10 @@
   21.75  
   21.76  	conf.do_verbose = FALSE;
   21.77  
   21.78 -	/* closing and reopening the log ensures that it is open afterwards
   21.79 -	   because it is possible that the log is assigned to fd 1 and gets
   21.80 -	   thus closes by fclose(stdout). Similar for the debugfile.
   21.81 +	/*
   21.82 +	**  closing and reopening the log ensures that it is open afterwards
   21.83 +	**  because it is possible that the log is assigned to fd 1 and gets
   21.84 +	**  thus closes by fclose(stdout). Similar for the debugfile.
   21.85  	*/
   21.86  	logclose();
   21.87  	fclose(stdin);
   21.88 @@ -204,7 +208,8 @@
   21.89  
   21.90  /* default mode if address args or -t is specified, or called as rmail */
   21.91  static void
   21.92 -mode_accept(address *return_path, gchar *full_sender_name, guint accept_flags, char **addresses, int addr_cnt)
   21.93 +mode_accept(address *return_path, gchar *full_sender_name, guint accept_flags,
   21.94 +		char **addresses, int addr_cnt)
   21.95  {
   21.96  	/* accept message on stdin */
   21.97  	accept_error err;
   21.98 @@ -293,11 +298,11 @@
   21.99  			exit(0);
  21.100  		} else {
  21.101  			/*
  21.102 -			TODO:
  21.103 -			Should we really fail here? Because the mail is queued
  21.104 -			already. If we fail the client might submit it again.
  21.105 -			If at-once-delivery is seen as an additional best-effort
  21.106 -			service, then we should still exit successful here.
  21.107 +			**  TODO: Should we really fail here? Because the
  21.108 +			**  mail is queued already. If we fail the client
  21.109 +			**  might submit it again.  If at-once-delivery
  21.110 +			**  is seen as an additional best-effort service,
  21.111 +			**  then we should still exit successful here.
  21.112  			*/
  21.113  			exit(1);
  21.114  		}
  21.115 @@ -305,11 +310,11 @@
  21.116  }
  21.117  
  21.118  /*
  21.119 -if -Mrm is given
  21.120 -
  21.121 -currently only the `rm' command is supported
  21.122 -until this changes, we don't need any facility for further commands
  21.123 -return success if at least one message had been deleted
  21.124 +**  if -Mrm is given
  21.125 +**
  21.126 +**  currently only the `rm' command is supported
  21.127 +**  until this changes, we don't need any facility for further commands
  21.128 +**  return success if at least one message had been deleted
  21.129  */
  21.130  static int
  21.131  manipulate_queue(char *cmd, char *id[])
  21.132 @@ -387,8 +392,10 @@
  21.133  		if (route_name) {
  21.134  			conf.online_query = g_strdup_printf("/bin/echo %s", route_name);
  21.135  		}
  21.136 -		/* TODO: change behavior of `-qo without argument'?
  21.137 -		         Because that behavior is included in -q. */
  21.138 +		/*
  21.139 +		**  TODO: change behavior of `-qo without argument'?
  21.140 +		**  Because that behavior is included in -q.
  21.141 +		*/
  21.142  		ret = queue_run_online();
  21.143  	}
  21.144  	return ret;
  21.145 @@ -412,7 +419,8 @@
  21.146  	with_ident = " +ident";
  21.147  #endif
  21.148  
  21.149 -	printf("%s %s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth, with_ident);
  21.150 +	printf("%s %s%s%s%s\n", PACKAGE, VERSION, with_resolver, with_auth,
  21.151 +			with_ident);
  21.152  }
  21.153  
  21.154  void
  21.155 @@ -462,9 +470,11 @@
  21.156  	} else if (strcmp(progname, "newaliases") == 0) {
  21.157  		mta_mode = MODE_BI;
  21.158  	} else if (strcmp(progname, "rmail") == 0) {
  21.159 -		/* the `rmail' alias should probably be removed now
  21.160 -		   that we have the rmail script. But let's keep it
  21.161 -		   for some while for compatibility. 2010-06-19 */
  21.162 +		/*
  21.163 +		**  the `rmail' alias should probably be removed now
  21.164 +		**  that we have the rmail script. But let's keep it
  21.165 +		**  for some while for compatibility. 2010-06-19
  21.166 +		*/
  21.167  		mta_mode = MODE_ACCEPT;
  21.168  		opt_i = TRUE;
  21.169  	} else if (strcmp(progname, "runq") == 0) {
  21.170 @@ -601,10 +611,10 @@
  21.171  
  21.172  	if (!mta_mode && arg==argc && !opt_t) {
  21.173  		/*
  21.174 -		In this case no rcpts can be found, thus no mail
  21.175 -		can be sent, thus masqmail will always fail. We
  21.176 -		rather do something better instead. This covers
  21.177 -		also the case of calling masqmail without args.
  21.178 +		**  In this case no rcpts can be found, thus no mail
  21.179 +		**  can be sent, thus masqmail will always fail. We
  21.180 +		**  rather do something better instead. This covers
  21.181 +		**  also the case of calling masqmail without args.
  21.182  		*/
  21.183  		mode_version();
  21.184  		exit(0);
  21.185 @@ -638,13 +648,14 @@
  21.186  
  21.187  	init_conf();
  21.188  
  21.189 -	/* if we are not privileged, and the config file was changed we
  21.190 -	   implicetely set the the run_as_user flag and give up all
  21.191 -	   privileges.
  21.192 -
  21.193 -	   So it is possible for a user to run his own daemon without
  21.194 -	   breaking security.
  21.195 -	 */
  21.196 +	/*
  21.197 +	**  if we are not privileged, and the config file was changed we
  21.198 +	**  implicetely set the the run_as_user flag and give up all
  21.199 +	**  privileges.
  21.200 +	**
  21.201 +	**  So it is possible for a user to run his own daemon without
  21.202 +	**  breaking security.
  21.203 +	*/
  21.204  	if ((strcmp(conf_file, CONF_FILE) != 0) && (conf.orig_uid != 0)) {
  21.205  		conf.run_as_user = TRUE;
  21.206  		set_euidgid(conf.orig_uid, conf.orig_gid, NULL, NULL);
  21.207 @@ -677,12 +688,13 @@
  21.208  		conf.debug_level = debug_level;
  21.209  	}
  21.210  
  21.211 -	/* It appears that changing to / ensures that we are never in
  21.212 -	   a directory which we cannot access. This situation could be
  21.213 -	   possible after changing identity.
  21.214 -	   Maybe we should only change to / if we not run as user, to
  21.215 -	   allow relative paths for log files in test setups for
  21.216 -	   instance.
  21.217 +	/*
  21.218 +	**  It appears that changing to / ensures that we are never in
  21.219 +	**  a directory which we cannot access. This situation could be
  21.220 +	**  possible after changing identity.
  21.221 +	**  Maybe we should only change to / if we not run as user, to
  21.222 +	**  allow relative paths for log files in test setups for
  21.223 +	**  instance.
  21.224  	*/
  21.225  	chdir("/");
  21.226  
    22.1 --- a/src/masqmail.h	Thu Sep 22 15:07:40 2011 +0200
    22.2 +++ b/src/masqmail.h	Thu Oct 20 10:20:59 2011 +0200
    22.3 @@ -1,20 +1,21 @@
    22.4 -/*  MasqMail
    22.5 -    Copyright (C) 1999-2001 Oliver Kurth
    22.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    22.7 -
    22.8 -    This program is free software; you can redistribute it and/or modify
    22.9 -    it under the terms of the GNU General Public License as published by
   22.10 -    the Free Software Foundation; either version 2 of the License, or
   22.11 -    (at your option) any later version.
   22.12 -
   22.13 -    This program is distributed in the hope that it will be useful,
   22.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   22.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   22.16 -    GNU General Public License for more details.
   22.17 -
   22.18 -    You should have received a copy of the GNU General Public License
   22.19 -    along with this program; if not, write to the Free Software
   22.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   22.21 +/*
   22.22 +**  MasqMail
   22.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   22.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   22.25 +**
   22.26 +**  This program is free software; you can redistribute it and/or modify
   22.27 +**  it under the terms of the GNU General Public License as published by
   22.28 +**  the Free Software Foundation; either version 2 of the License, or
   22.29 +**  (at your option) any later version.
   22.30 +**
   22.31 +**  This program is distributed in the hope that it will be useful,
   22.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   22.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   22.34 +**  GNU General Public License for more details.
   22.35 +**
   22.36 +**  You should have received a copy of the GNU General Public License
   22.37 +**  along with this program; if not, write to the Free Software
   22.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   22.39  */
   22.40  #include <config.h>
   22.41  
   22.42 @@ -140,8 +141,10 @@
   22.43  	GList *not_local_addresses;
   22.44  	GList *listen_addresses;
   22.45  
   22.46 -	/* ANSI C defines unsigned long to be at least 32bit
   22.47 -	   i.e. ca. 4GB max; that should be enough. */
   22.48 +	/*
   22.49 +	**  ANSI C defines unsigned long to be at least 32bit
   22.50 +	**  i.e. ca. 4GB max; that should be enough.
   22.51 +	*/
   22.52  	gulong max_msg_size;
   22.53  
   22.54  	gboolean do_save_envelope_to;
    23.1 --- a/src/md5/hmac_md5.c	Thu Sep 22 15:07:40 2011 +0200
    23.2 +++ b/src/md5/hmac_md5.c	Thu Oct 20 10:20:59 2011 +0200
    23.3 @@ -1,30 +1,30 @@
    23.4  /*
    23.5 -hmac_md5 -- implements RFC 2104
    23.6 -
    23.7 -Copyright 2010, markus schnalke <meillo@marmaro.de>
    23.8 -
    23.9 -Permission to use, copy, modify, and/or distribute this software for any
   23.10 -purpose with or without fee is hereby granted, provided that the above
   23.11 -copyright notice and this permission notice appear in all copies.
   23.12 -
   23.13 -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   23.14 -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   23.15 -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   23.16 -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   23.17 -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   23.18 -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   23.19 -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   23.20 -
   23.21 -
   23.22 -My motivation to write this code was the lack of a nicely licensed
   23.23 -hmac_md5 function in C. I programmed it following the RFC's text.
   23.24 -Obviously this code is highly similar to the sample code of the RFC.
   23.25 -The code is tested against the test vectors of the RFC. Wikipedia's
   23.26 -HMAC page helped me to understand the algorithm better.
   23.27 -
   23.28 -This hmac_md5 function requires an OpenSSL-compatible MD5
   23.29 -implementation. There are Public Domain MD5 implementations by Colin
   23.30 -Plumb and by Solar Designer. You probably want to use one of these.
   23.31 +**  hmac_md5 -- implements RFC 2104
   23.32 +**  
   23.33 +**  Copyright 2010, markus schnalke <meillo@marmaro.de>
   23.34 +**  
   23.35 +**  Permission to use, copy, modify, and/or distribute this software for any
   23.36 +**  purpose with or without fee is hereby granted, provided that the above
   23.37 +**  copyright notice and this permission notice appear in all copies.
   23.38 +**  
   23.39 +**  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
   23.40 +**  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
   23.41 +**  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
   23.42 +**  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
   23.43 +**  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
   23.44 +**  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
   23.45 +**  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   23.46 +**  
   23.47 +**  
   23.48 +**  My motivation to write this code was the lack of a nicely licensed
   23.49 +**  hmac_md5 function in C. I programmed it following the RFC's text.
   23.50 +**  Obviously this code is highly similar to the sample code of the RFC.
   23.51 +**  The code is tested against the test vectors of the RFC. Wikipedia's
   23.52 +**  HMAC page helped me to understand the algorithm better.
   23.53 +**  
   23.54 +**  This hmac_md5 function requires an OpenSSL-compatible MD5
   23.55 +**  implementation. There are Public Domain MD5 implementations by Colin
   23.56 +**  Plumb and by Solar Designer. You probably want to use one of these.
   23.57  */
   23.58  
   23.59  #include <string.h>
   23.60 @@ -36,11 +36,12 @@
   23.61  
   23.62  
   23.63  /*
   23.64 -The computed HMAC will be written to `digest'.
   23.65 -Ensure digest points to hashsize bytes of allocated memory.
   23.66 +**  The computed HMAC will be written to `digest'.
   23.67 +**  Ensure digest points to hashsize bytes of allocated memory.
   23.68  */
   23.69  void
   23.70 -hmac_md5(unsigned char *text, int textlen, unsigned char *key, int keylen, unsigned char *digest)
   23.71 +hmac_md5(unsigned char *text, int textlen, unsigned char *key, int keylen,
   23.72 +		unsigned char *digest)
   23.73  {
   23.74  	int i;
   23.75  	MD5_CTX context;
    24.1 --- a/src/md5/hmactest.c	Thu Sep 22 15:07:40 2011 +0200
    24.2 +++ b/src/md5/hmactest.c	Thu Oct 20 10:20:59 2011 +0200
    24.3 @@ -6,23 +6,23 @@
    24.4  #include "hmac_md5.h"
    24.5  
    24.6  /*
    24.7 -instead of pad0_copy(d, s, sz) use:
    24.8 -	memset(d, 0, sz);
    24.9 -	memcpy(d, s, strlen(s));
   24.10 -
   24.11 -static void
   24.12 -pad0_copy(char *d, char *s, int sz)
   24.13 -{
   24.14 -	int i = 0;
   24.15 -	while (*s && (i < sz)) {
   24.16 -		*(d++) = *(s++);
   24.17 -		i++;
   24.18 -	}
   24.19 -	while (i <= sz) {
   24.20 -		*(d++) = 0;
   24.21 -		i++;
   24.22 -	}
   24.23 -}
   24.24 +**  instead of pad0_copy(d, s, sz) use:
   24.25 +**  	memset(d, 0, sz);
   24.26 +**  	memcpy(d, s, strlen(s));
   24.27 +**  
   24.28 +**  static void
   24.29 +**  pad0_copy(char *d, char *s, int sz)
   24.30 +**  {
   24.31 +**  	int i = 0;
   24.32 +**  	while (*s && (i < sz)) {
   24.33 +**  		*(d++) = *(s++);
   24.34 +**  		i++;
   24.35 +**  	}
   24.36 +**  	while (i <= sz) {
   24.37 +**  		*(d++) = 0;
   24.38 +**  		i++;
   24.39 +**  	}
   24.40 +**  }
   24.41  */
   24.42  
   24.43  int
    25.1 --- a/src/message.c	Thu Sep 22 15:07:40 2011 +0200
    25.2 +++ b/src/message.c	Thu Oct 20 10:20:59 2011 +0200
    25.3 @@ -1,20 +1,21 @@
    25.4 -/*  MasqMail
    25.5 -    Copyright (C) 1999-2001 Oliver Kurth
    25.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    25.7 -
    25.8 -    This program is free software; you can redistribute it and/or modify
    25.9 -    it under the terms of the GNU General Public License as published by
   25.10 -    the Free Software Foundation; either version 2 of the License, or
   25.11 -    (at your option) any later version.
   25.12 -
   25.13 -    This program is distributed in the hope that it will be useful,
   25.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   25.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   25.16 -    GNU General Public License for more details.
   25.17 -
   25.18 -    You should have received a copy of the GNU General Public License
   25.19 -    along with this program; if not, write to the Free Software
   25.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   25.21 +/*
   25.22 +**  MasqMail
   25.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   25.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   25.25 +**
   25.26 +**  This program is free software; you can redistribute it and/or modify
   25.27 +**  it under the terms of the GNU General Public License as published by
   25.28 +**  the Free Software Foundation; either version 2 of the License, or
   25.29 +**  (at your option) any later version.
   25.30 +**
   25.31 +**  This program is distributed in the hope that it will be useful,
   25.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   25.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   25.34 +**  GNU General Public License for more details.
   25.35 +**
   25.36 +**  You should have received a copy of the GNU General Public License
   25.37 +**  along with this program; if not, write to the Free Software
   25.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   25.39  */
   25.40  
   25.41  #include "masqmail.h"
   25.42 @@ -31,19 +32,19 @@
   25.43  }
   25.44  
   25.45  /*
   25.46 -   This function is currently (0.2.24) only used for client side SMTP
   25.47 -   SIZE support (RFC 1870). The flag is_smtp is always true therefore.
   25.48 -
   25.49 -   Their definition of the message size in RFC 1870 is:
   25.50 -
   25.51 -       The message size is defined as the number of octets, including
   25.52 -       CR-LF pairs, but not the SMTP DATA command's terminating dot
   25.53 -       or doubled quoting dots, to be transmitted by the SMTP client
   25.54 -       after receiving reply code 354 to the DATA command.
   25.55 -
   25.56 -   l_cnt (line count) covers '\r' characters which are not present in
   25.57 -   masqmail's internal format. Dots are also not stuffed in the
   25.58 -   internal format. Dot-stuffing is ignored in the size.
   25.59 +**  This function is currently (0.2.24) only used for client side SMTP
   25.60 +**  SIZE support (RFC 1870). The flag is_smtp is always true therefore.
   25.61 +**
   25.62 +**  Their definition of the message size in RFC 1870 is:
   25.63 +**
   25.64 +**      The message size is defined as the number of octets, including
   25.65 +**      CR-LF pairs, but not the SMTP DATA command's terminating dot
   25.66 +**      or doubled quoting dots, to be transmitted by the SMTP client
   25.67 +**      after receiving reply code 354 to the DATA command.
   25.68 +**
   25.69 +**  l_cnt (line count) covers '\r' characters which are not present in
   25.70 +**  masqmail's internal format. Dots are also not stuffed in the
   25.71 +**  internal format. Dot-stuffing is ignored in the size.
   25.72  */
   25.73  gint
   25.74  msg_calc_size(message *msg, gboolean is_smtp)
    26.1 --- a/src/mservdetect.c	Thu Sep 22 15:07:40 2011 +0200
    26.2 +++ b/src/mservdetect.c	Thu Oct 20 10:20:59 2011 +0200
    26.3 @@ -1,20 +1,21 @@
    26.4 -/*  MasqMail
    26.5 -    Copyright (C) 1999-2001 Oliver Kurth
    26.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    26.7 -
    26.8 -    This program is free software; you can redistribute it and/or modify
    26.9 -    it under the terms of the GNU General Public License as published by
   26.10 -    the Free Software Foundation; either version 2 of the License, or
   26.11 -    (at your option) any later version.
   26.12 -
   26.13 -    This program is distributed in the hope that it will be useful,
   26.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   26.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   26.16 -    GNU General Public License for more details.
   26.17 -
   26.18 -    You should have received a copy of the GNU General Public License
   26.19 -    along with this program; if not, write to the Free Software
   26.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   26.21 +/*
   26.22 +**  MasqMail
   26.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   26.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   26.25 +**
   26.26 +**  This program is free software; you can redistribute it and/or modify
   26.27 +**  it under the terms of the GNU General Public License as published by
   26.28 +**  the Free Software Foundation; either version 2 of the License, or
   26.29 +**  (at your option) any later version.
   26.30 +**
   26.31 +**  This program is distributed in the hope that it will be useful,
   26.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   26.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   26.34 +**  GNU General Public License for more details.
   26.35 +**
   26.36 +**  You should have received a copy of the GNU General Public License
   26.37 +**  along with this program; if not, write to the Free Software
   26.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   26.39  */
   26.40  
   26.41  
   26.42 @@ -72,19 +73,20 @@
   26.43  		return NULL;
   26.44  	}
   26.45  
   26.46 -	/* this is the protocol (reverse engineered):
   26.47 -
   26.48 -	                    S: READY
   26.49 -	                    C: STAT
   26.50 -	                        |
   26.51 -	       +----------------+-----------------+
   26.52 -	       |                |                 |
   26.53 -	   S: DOWN          S: UP foo:-1      S: UP foo:1
   26.54 -	   C: QUIT          C: QUIT           C: QUIT
   26.55 -
   26.56 -	   -> offline       -> offline        -> online
   26.57 -	                                      `foo' gets printed
   26.58 -
   26.59 +	/*
   26.60 +	**  this is the protocol (reverse engineered):
   26.61 +	**
   26.62 +	**                    S: READY
   26.63 +	**                    C: STAT
   26.64 +	**                        |
   26.65 +	**       +----------------+-----------------+
   26.66 +	**       |                |                 |
   26.67 +	**   S: DOWN          S: UP foo:-1      S: UP foo:1
   26.68 +	**   C: QUIT          C: QUIT           C: QUIT
   26.69 +	**
   26.70 +	**   -> offline       -> offline        -> online
   26.71 +	**                                      `foo' gets printed
   26.72 +	**
   26.73  	*/
   26.74  
   26.75  	if (strncmp(buf, "READY", 5) == 0) {
    27.1 --- a/src/online.c	Thu Sep 22 15:07:40 2011 +0200
    27.2 +++ b/src/online.c	Thu Oct 20 10:20:59 2011 +0200
    27.3 @@ -1,20 +1,21 @@
    27.4 -/*  MasqMail
    27.5 -    Copyright (C) 1999-2001 Oliver Kurth
    27.6 -    Copyright (C) 2008, 2010 markus schnalke <meillo@marmaro.de>
    27.7 -
    27.8 -    This program is free software; you can redistribute it and/or modify
    27.9 -    it under the terms of the GNU General Public License as published by
   27.10 -    the Free Software Foundation; either version 2 of the License, or
   27.11 -    (at your option) any later version.
   27.12 -
   27.13 -    This program is distributed in the hope that it will be useful,
   27.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   27.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   27.16 -    GNU General Public License for more details.
   27.17 -
   27.18 -    You should have received a copy of the GNU General Public License
   27.19 -    along with this program; if not, write to the Free Software
   27.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   27.21 +/*
   27.22 +**  MasqMail
   27.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   27.24 +**  Copyright (C) 2008, 2010 markus schnalke <meillo@marmaro.de>
   27.25 +**
   27.26 +**  This program is free software; you can redistribute it and/or modify
   27.27 +**  it under the terms of the GNU General Public License as published by
   27.28 +**  the Free Software Foundation; either version 2 of the License, or
   27.29 +**  (at your option) any later version.
   27.30 +**
   27.31 +**  This program is distributed in the hope that it will be useful,
   27.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   27.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   27.34 +**  GNU General Public License for more details.
   27.35 +**
   27.36 +**  You should have received a copy of the GNU General Public License
   27.37 +**  along with this program; if not, write to the Free Software
   27.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   27.39  */
   27.40  
   27.41  #include <sys/wait.h>
    28.1 --- a/src/parse.c	Thu Sep 22 15:07:40 2011 +0200
    28.2 +++ b/src/parse.c	Thu Oct 20 10:20:59 2011 +0200
    28.3 @@ -1,33 +1,35 @@
    28.4 -/*  MasqMail
    28.5 -    Copyright (C) 1999-2001 Oliver Kurth
    28.6 -    Copyright (C) 2010  markus schnalke <meillo@marmaro.de>
    28.7 -
    28.8 -    This program is free software; you can redistribute it and/or modify
    28.9 -    it under the terms of the GNU General Public License as published by
   28.10 -    the Free Software Foundation; either version 2 of the License, or
   28.11 -    (at your option) any later version.
   28.12 -
   28.13 -    This program is distributed in the hope that it will be useful,
   28.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   28.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   28.16 -    GNU General Public License for more details.
   28.17 -
   28.18 -    You should have received a copy of the GNU General Public License
   28.19 -    along with this program; if not, write to the Free Software
   28.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   28.21 +/*
   28.22 +**  MasqMail
   28.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   28.24 +**  Copyright (C) 2010  markus schnalke <meillo@marmaro.de>
   28.25 +**
   28.26 +**  This program is free software; you can redistribute it and/or modify
   28.27 +**  it under the terms of the GNU General Public License as published by
   28.28 +**  the Free Software Foundation; either version 2 of the License, or
   28.29 +**  (at your option) any later version.
   28.30 +**
   28.31 +**  This program is distributed in the hope that it will be useful,
   28.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   28.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   28.34 +**  GNU General Public License for more details.
   28.35 +**
   28.36 +**  You should have received a copy of the GNU General Public License
   28.37 +**  along with this program; if not, write to the Free Software
   28.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   28.39  */
   28.40  
   28.41  #ifndef PARSE_TEST
   28.42  #include "masqmail.h"
   28.43  #endif
   28.44  
   28.45 -/* This is really dangerous. I hope that I was careful enough,
   28.46 -   but maybe there is some malformed address possible that causes
   28.47 -   this to segfault or be caught in endless loops.
   28.48 +/*
   28.49 +**  This is really dangerous. I hope that I was careful enough,
   28.50 +**  but maybe there is some malformed address possible that causes
   28.51 +**  this to segfault or be caught in endless loops.
   28.52  
   28.53 -   If you find something like that, PLEASE mail the string to me
   28.54 -   (no matter how idiotic it is), so that I can debug that.
   28.55 -   Those things really should not happen.
   28.56 +**  If you find something like that, PLEASE mail the string to me
   28.57 +**  (no matter how idiotic it is), so that I can debug that.
   28.58 +**  Those things really should not happen.
   28.59  */
   28.60  
   28.61  static gchar *specials = "()<>@,;:\\\".[]`";
   28.62 @@ -134,8 +136,8 @@
   28.63  }
   28.64  
   28.65  gboolean
   28.66 -parse_address_rfc822(gchar *string, gchar **local_begin, gchar **local_end, gchar **domain_begin,
   28.67 -                     gchar **domain_end, gchar **address_end)
   28.68 +parse_address_rfc822(gchar *string, gchar **local_begin, gchar **local_end,
   28.69 +		gchar **domain_begin, gchar **domain_end, gchar **address_end)
   28.70  {
   28.71  	gint angle_brackets = 0;
   28.72  
   28.73 @@ -183,8 +185,10 @@
   28.74  				p++;
   28.75  			}
   28.76  		}
   28.77 -		/* we now have a non-space char that is not
   28.78 -		   the beginning of a comment */
   28.79 +		/*
   28.80 +		**  we now have a non-space char that is not
   28.81 +		**  the beginning of a comment
   28.82 +		*/
   28.83  
   28.84  		if (*p == '@' || *p == ',') {
   28.85  			/* the last word was the local_part of an addr-spec */
   28.86 @@ -284,8 +288,8 @@
   28.87  }
   28.88  
   28.89  gboolean
   28.90 -parse_address_rfc821(gchar *string, gchar **local_begin, gchar **local_end, gchar **domain_begin,
   28.91 -                     gchar **domain_end, gchar **address_end)
   28.92 +parse_address_rfc821(gchar *string, gchar **local_begin, gchar **local_end,
   28.93 +		gchar **domain_begin, gchar **domain_end, gchar **address_end)
   28.94  {
   28.95  	gint angle_brackets = 0;
   28.96  
   28.97 @@ -371,12 +375,12 @@
   28.98  }
   28.99  
  28.100  /*
  28.101 -  allocate address, reading from string.
  28.102 -  On failure, returns NULL.
  28.103 -  after call, end contains a pointer to the end of the parsed string
  28.104 -  end may be NULL, if we are not interested.
  28.105 -
  28.106 -  parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
  28.107 +**  allocate address, reading from string.
  28.108 +**  On failure, returns NULL.
  28.109 +**  after call, end contains a pointer to the end of the parsed string
  28.110 +**  end may be NULL, if we are not interested.
  28.111 +**
  28.112 +**  parses both rfc 821 and rfc 822 addresses, depending on flag is_rfc821
  28.113  */
  28.114  address*
  28.115  _create_address(gchar *string, gchar **end, gboolean is_rfc821)
    29.1 --- a/src/peopen.c	Thu Sep 22 15:07:40 2011 +0200
    29.2 +++ b/src/peopen.c	Thu Oct 20 10:20:59 2011 +0200
    29.3 @@ -1,6 +1,7 @@
    29.4 -/* This a snippet I found in sourceforge. I just changed the identing
    29.5 -   style to my own and deleted the main function. -- oku
    29.6 -   The functions destroy_argv() and create_argv() were added by oku.
    29.7 +/*
    29.8 +**  This a snippet I found in sourceforge. I just changed the identing
    29.9 +**  style to my own and deleted the main function. -- oku
   29.10 +**  The functions destroy_argv() and create_argv() were added by oku.
   29.11  */
   29.12  
   29.13  #include <errno.h>
   29.14 @@ -55,7 +56,8 @@
   29.15  }
   29.16  
   29.17  FILE*
   29.18 -peidopen(const char *command, const char *type, char *const envp[], int *ret_pid, uid_t uid, gid_t gid)
   29.19 +peidopen(const char *command, const char *type, char *const envp[],
   29.20 +		int *ret_pid, uid_t uid, gid_t gid)
   29.21  {
   29.22  	enum { Read, Write } mode;
   29.23  	int pipe_fd[2];
   29.24 @@ -93,7 +95,7 @@
   29.25  		if (close(pipe_fd[mode == Read ? 0 : 1]) != -1 &&
   29.26  			dup2(pipe_fd[mode == Read ? 1 : 0],
   29.27  				 mode == Read ? STDOUT_FILENO : STDIN_FILENO) != -1) {
   29.28 -			/*      char *argv [] = { "/bin/sh", "-c", (char*) command, NULL }; */
   29.29 +			/* char *argv [] = { "/bin/sh", "-c", (char*) command, NULL }; */
   29.30  			char **argv = create_argv(command, 10);
   29.31  			int ret;
   29.32  
    30.1 --- a/src/permissions.c	Thu Sep 22 15:07:40 2011 +0200
    30.2 +++ b/src/permissions.c	Thu Oct 20 10:20:59 2011 +0200
    30.3 @@ -1,20 +1,21 @@
    30.4 -/*  MasqMail
    30.5 -    Copyright (C) 2000 Oliver Kurth
    30.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    30.7 -
    30.8 -    This program is free software; you can redistribute it and/or modify
    30.9 -    it under the terms of the GNU General Public License as published by
   30.10 -    the Free Software Foundation; either version 2 of the License, or
   30.11 -    (at your option) any later version.
   30.12 -
   30.13 -    This program is distributed in the hope that it will be useful,
   30.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   30.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   30.16 -    GNU General Public License for more details.
   30.17 -
   30.18 -    You should have received a copy of the GNU General Public License
   30.19 -    along with this program; if not, write to the Free Software
   30.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   30.21 +/*
   30.22 +**  MasqMail
   30.23 +**  Copyright (C) 2000 Oliver Kurth
   30.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   30.25 +**
   30.26 +**  This program is free software; you can redistribute it and/or modify
   30.27 +**  it under the terms of the GNU General Public License as published by
   30.28 +**  the Free Software Foundation; either version 2 of the License, or
   30.29 +**  (at your option) any later version.
   30.30 +**
   30.31 +**  This program is distributed in the hope that it will be useful,
   30.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   30.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   30.34 +**  GNU General Public License for more details.
   30.35 +**
   30.36 +**  You should have received a copy of the GNU General Public License
   30.37 +**  along with this program; if not, write to the Free Software
   30.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   30.39  */
   30.40  
   30.41  #include <pwd.h>
    31.1 --- a/src/queue.c	Thu Sep 22 15:07:40 2011 +0200
    31.2 +++ b/src/queue.c	Thu Oct 20 10:20:59 2011 +0200
    31.3 @@ -1,20 +1,21 @@
    31.4 -/*  MasqMail
    31.5 -    Copyright (C) 1999-2001 Oliver Kurth
    31.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    31.7 -
    31.8 -    This program is free software; you can redistribute it and/or modify
    31.9 -    it under the terms of the GNU General Public License as published by
   31.10 -    the Free Software Foundation; either version 2 of the License, or
   31.11 -    (at your option) any later version.
   31.12 -
   31.13 -    This program is distributed in the hope that it will be useful,
   31.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   31.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   31.16 -    GNU General Public License for more details.
   31.17 -
   31.18 -    You should have received a copy of the GNU General Public License
   31.19 -    along with this program; if not, write to the Free Software
   31.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   31.21 +/*
   31.22 +**  MasqMail
   31.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   31.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   31.25 +**
   31.26 +**  This program is free software; you can redistribute it and/or modify
   31.27 +**  it under the terms of the GNU General Public License as published by
   31.28 +**  the Free Software Foundation; either version 2 of the License, or
   31.29 +**  (at your option) any later version.
   31.30 +**
   31.31 +**  This program is distributed in the hope that it will be useful,
   31.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   31.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   31.34 +**  GNU General Public License for more details.
   31.35 +**
   31.36 +**  You should have received a copy of the GNU General Public License
   31.37 +**  along with this program; if not, write to the Free Software
   31.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   31.39  */
   31.40  
   31.41  #include <sys/stat.h>
   31.42 @@ -49,8 +50,10 @@
   31.43  	gchar *pattern;
   31.44  	int i, *idx_arr;
   31.45  
   31.46 -	/* Escaping the question marks prevents them from being
   31.47 -	   interpreted as trigraphs */
   31.48 +	/*
   31.49 +	**  Escaping the question marks prevents them from being
   31.50 +	**  interpreted as trigraphs
   31.51 +	*/
   31.52  	pattern = g_strdup_printf("%s/input/?????\?-??\?-?\?-H", conf.spool_dir);
   31.53  	gl.gl_offs = 0;
   31.54  	glob(pattern, 0, NULL, &gl);
    32.1 --- a/src/readsock.c	Thu Sep 22 15:07:40 2011 +0200
    32.2 +++ b/src/readsock.c	Thu Oct 20 10:20:59 2011 +0200
    32.3 @@ -1,19 +1,20 @@
    32.4 -/*  MasqMail
    32.5 -    Copyright (C) 2000 Oliver Kurth
    32.6 -
    32.7 -    This program is free software; you can redistribute it and/or modify
    32.8 -    it under the terms of the GNU General Public License as published by
    32.9 -    the Free Software Foundation; either version 2 of the License, or
   32.10 -    (at your option) any later version.
   32.11 -
   32.12 -    This program is distributed in the hope that it will be useful,
   32.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   32.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   32.15 -    GNU General Public License for more details.
   32.16 -
   32.17 -    You should have received a copy of the GNU General Public License
   32.18 -    along with this program; if not, write to the Free Software
   32.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   32.20 +/*
   32.21 +**  MasqMail
   32.22 +**  Copyright (C) 2000 Oliver Kurth
   32.23 +**
   32.24 +**  This program is free software; you can redistribute it and/or modify
   32.25 +**  it under the terms of the GNU General Public License as published by
   32.26 +**  the Free Software Foundation; either version 2 of the License, or
   32.27 +**  (at your option) any later version.
   32.28 +**
   32.29 +**  This program is distributed in the hope that it will be useful,
   32.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   32.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   32.32 +**  GNU General Public License for more details.
   32.33 +**
   32.34 +**  You should have received a copy of the GNU General Public License
   32.35 +**  along with this program; if not, write to the Free Software
   32.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   32.37  */
   32.38  
   32.39  #include <signal.h>
   32.40 @@ -131,7 +132,8 @@
   32.41  }
   32.42  
   32.43  int
   32.44 -read_sockline1(FILE *in, char **pbuf, int *buf_len, int timeout, unsigned int flags)
   32.45 +read_sockline1(FILE *in, char **pbuf, int *buf_len, int timeout,
   32.46 +		unsigned int flags)
   32.47  {
   32.48  	int p = 0, size = *buf_len;
   32.49  	char *buf;
    33.1 --- a/src/readsock.h	Thu Sep 22 15:07:40 2011 +0200
    33.2 +++ b/src/readsock.h	Thu Oct 20 10:20:59 2011 +0200
    33.3 @@ -1,19 +1,20 @@
    33.4 -/*  MasqMail
    33.5 -    Copyright (C) 2000 Oliver Kurth
    33.6 -
    33.7 -    This program is free software; you can redistribute it and/or modify
    33.8 -    it under the terms of the GNU General Public License as published by
    33.9 -    the Free Software Foundation; either version 2 of the License, or
   33.10 -    (at your option) any later version.
   33.11 -
   33.12 -    This program is distributed in the hope that it will be useful,
   33.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   33.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   33.15 -    GNU General Public License for more details.
   33.16 -
   33.17 -    You should have received a copy of the GNU General Public License
   33.18 -    along with this program; if not, write to the Free Software
   33.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   33.20 +/*
   33.21 +**  MasqMail
   33.22 +**  Copyright (C) 2000 Oliver Kurth
   33.23 +**
   33.24 +**  This program is free software; you can redistribute it and/or modify
   33.25 +**  it under the terms of the GNU General Public License as published by
   33.26 +**  the Free Software Foundation; either version 2 of the License, or
   33.27 +**  (at your option) any later version.
   33.28 +**
   33.29 +**  This program is distributed in the hope that it will be useful,
   33.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   33.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   33.32 +**  GNU General Public License for more details.
   33.33 +**
   33.34 +**  You should have received a copy of the GNU General Public License
   33.35 +**  along with this program; if not, write to the Free Software
   33.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   33.37  */
   33.38  
   33.39  #define READSOCKL_CHUG 0x01
    34.1 --- a/src/readtest.c	Thu Sep 22 15:07:40 2011 +0200
    34.2 +++ b/src/readtest.c	Thu Oct 20 10:20:59 2011 +0200
    34.3 @@ -1,4 +1,3 @@
    34.4 -
    34.5  #include "masqmail.h"
    34.6  #include "readsock.h"
    34.7  
    35.1 --- a/src/resolvtest.c	Thu Sep 22 15:07:40 2011 +0200
    35.2 +++ b/src/resolvtest.c	Thu Oct 20 10:20:59 2011 +0200
    35.3 @@ -1,20 +1,22 @@
    35.4 -/* MasqMail Copyright (C) Oliver Kurth,
    35.5 -/* Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    35.6 - *
    35.7 - * This program is free software; you can redistribute it and/or modify
    35.8 - * it under the terms of the GNU General Public License as published by
    35.9 - * the Free Software Foundation; either version 2 of the License, or
   35.10 - * (at your option) any later version.
   35.11 - *
   35.12 - * This program is distributed in the hope that it will be useful,
   35.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   35.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   35.15 - * GNU General Public License for more details.
   35.16 - *
   35.17 - * You should have received a copy of the GNU General Public License
   35.18 - * along with this program; if not, write to the Free Software
   35.19 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   35.20 - */
   35.21 +/*
   35.22 +**  MasqMail
   35.23 +**  Copyright (C) Oliver Kurth,
   35.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   35.25 +**
   35.26 +**  This program is free software; you can redistribute it and/or modify
   35.27 +**  it under the terms of the GNU General Public License as published by
   35.28 +**  the Free Software Foundation; either version 2 of the License, or
   35.29 +**  (at your option) any later version.
   35.30 +**
   35.31 +**  This program is distributed in the hope that it will be useful,
   35.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   35.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   35.34 +**  GNU General Public License for more details.
   35.35 +**
   35.36 +**  You should have received a copy of the GNU General Public License
   35.37 +**  along with this program; if not, write to the Free Software
   35.38 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   35.39 +*/
   35.40  
   35.41  
   35.42  #include <sys/types.h>
    36.1 --- a/src/rewrite.c	Thu Sep 22 15:07:40 2011 +0200
    36.2 +++ b/src/rewrite.c	Thu Oct 20 10:20:59 2011 +0200
    36.3 @@ -1,19 +1,20 @@
    36.4 -/*  MasqMail
    36.5 -    Copyright (C) 1999-2001 Oliver Kurth
    36.6 -
    36.7 -    This program is free software; you can redistribute it and/or modify
    36.8 -    it under the terms of the GNU General Public License as published by
    36.9 -    the Free Software Foundation; either version 2 of the License, or
   36.10 -    (at your option) any later version.
   36.11 -
   36.12 -    This program is distributed in the hope that it will be useful,
   36.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   36.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   36.15 -    GNU General Public License for more details.
   36.16 -
   36.17 -    You should have received a copy of the GNU General Public License
   36.18 -    along with this program; if not, write to the Free Software
   36.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   36.20 +/*
   36.21 +**  MasqMail
   36.22 +**  Copyright (C) 1999-2001 Oliver Kurth
   36.23 +**
   36.24 +**  This program is free software; you can redistribute it and/or modify
   36.25 +**  it under the terms of the GNU General Public License as published by
   36.26 +**  the Free Software Foundation; either version 2 of the License, or
   36.27 +**  (at your option) any later version.
   36.28 +**
   36.29 +**  This program is distributed in the hope that it will be useful,
   36.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   36.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   36.32 +**  GNU General Public License for more details.
   36.33 +**
   36.34 +**  You should have received a copy of the GNU General Public License
   36.35 +**  along with this program; if not, write to the Free Software
   36.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   36.37  */
   36.38  
   36.39  #ifndef REWRITE_TEST
    37.1 --- a/src/route.c	Thu Sep 22 15:07:40 2011 +0200
    37.2 +++ b/src/route.c	Thu Oct 20 10:20:59 2011 +0200
    37.3 @@ -1,20 +1,21 @@
    37.4 -/*  MasqMail
    37.5 -    Copyright (C) 1999-2001 Oliver Kurth
    37.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    37.7 -
    37.8 -    This program is free software; you can redistribute it and/or modify
    37.9 -    it under the terms of the GNU General Public License as published by
   37.10 -    the Free Software Foundation; either version 2 of the License, or
   37.11 -    (at your option) any later version.
   37.12 -
   37.13 -    This program is distributed in the hope that it will be useful,
   37.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   37.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   37.16 -    GNU General Public License for more details.
   37.17 -
   37.18 -    You should have received a copy of the GNU General Public License
   37.19 -    along with this program; if not, write to the Free Software
   37.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   37.21 +/*
   37.22 +**  MasqMail
   37.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   37.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   37.25 +**
   37.26 +**  This program is free software; you can redistribute it and/or modify
   37.27 +**  it under the terms of the GNU General Public License as published by
   37.28 +**  the Free Software Foundation; either version 2 of the License, or
   37.29 +**  (at your option) any later version.
   37.30 +**
   37.31 +**  This program is distributed in the hope that it will be useful,
   37.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   37.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   37.34 +**  GNU General Public License for more details.
   37.35 +**
   37.36 +**  You should have received a copy of the GNU General Public License
   37.37 +**  along with this program; if not, write to the Free Software
   37.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   37.39  */
   37.40  
   37.41  #include <fnmatch.h>
   37.42 @@ -50,9 +51,10 @@
   37.43  void
   37.44  rewrite_headers(msg_out *msgout, connect_route *route)
   37.45  {
   37.46 -	/* if set_h_from_domain is set, replace domain in all
   37.47 -	   From: headers.
   37.48 -	 */
   37.49 +	/*
   37.50 +	**  if set_h_from_domain is set, replace domain in all
   37.51 +	**  From: headers.
   37.52 +	*/
   37.53  	msgout->hdr_list = g_list_copy(msgout->msg->hdr_list);
   37.54  
   37.55  	/* map from addresses */
   37.56 @@ -191,14 +193,15 @@
   37.57  }
   37.58  
   37.59  /*
   37.60 -Split a recipient list into the three groups:
   37.61 -- local recipients
   37.62 -- those maching the patterns
   37.63 -- those not matching the patterns
   37.64 -If patterns is NULL: only splitting between local and others is done.
   37.65 +**  Split a recipient list into the three groups:
   37.66 +**  - local recipients
   37.67 +**  - those maching the patterns
   37.68 +**  - those not matching the patterns
   37.69 +**  If patterns is NULL: only splitting between local and others is done.
   37.70  */
   37.71  void
   37.72 -split_rcpts(GList *rcpt_list, GList *patterns, GList **rl_local, GList **rl_matching, GList **rl_others)
   37.73 +split_rcpts(GList *rcpt_list, GList *patterns, GList **rl_local,
   37.74 +		GList **rl_matching, GList **rl_others)
   37.75  {
   37.76  	GList *rcpt_node;
   37.77  	GList *host_node = NULL;
   37.78 @@ -215,8 +218,10 @@
   37.79  			if (rl_local)
   37.80  				*rl_local = g_list_append(*rl_local, rcpt);
   37.81  		} else {
   37.82 -			/* if patterns is NULL, host_node will be NULL,
   37.83 -			   hence all non-locals are put to others */
   37.84 +			/*
   37.85 +			**  if patterns is NULL, host_node will be NULL,
   37.86 +			**  hence all non-locals are put to others
   37.87 +			*/
   37.88  			foreach(patterns, host_node) {
   37.89  				gchar *host = (gchar *) (host_node->data);
   37.90  				if (fnmatch(host, rcpt->domain, FNM_CASEFOLD) == 0)
   37.91 @@ -234,8 +239,8 @@
   37.92  }
   37.93  
   37.94  /*
   37.95 -Return a new list of the local rcpts in the rcpt_list
   37.96 -TODO: This function is almost exactly the same as remote_rcpts(). Merge?
   37.97 +**  Return a new list of the local rcpts in the rcpt_list
   37.98 +**  TODO: This function is almost exactly the same as remote_rcpts(). Merge?
   37.99  */
  37.100  GList*
  37.101  local_rcpts(GList *rcpt_list)
  37.102 @@ -257,8 +262,8 @@
  37.103  }
  37.104  
  37.105  /*
  37.106 -Return a new list of non-local rcpts in the rcpt_list
  37.107 -TODO: This function is almost exactly the same as local_rcpts(). Merge?
  37.108 +**  Return a new list of non-local rcpts in the rcpt_list
  37.109 +**  TODO: This function is almost exactly the same as local_rcpts(). Merge?
  37.110  */
  37.111  GList*
  37.112  remote_rcpts(GList *rcpt_list)
  37.113 @@ -317,8 +322,8 @@
  37.114  }
  37.115  
  37.116  /*
  37.117 -   Make lists of matching/not matching rcpts.
  37.118 -   Local domains are NOT regared here, these should be sorted out previously
  37.119 +**  Make lists of matching/not matching rcpts.
  37.120 +**  Local domains are NOT regared here, these should be sorted out previously
  37.121  */
  37.122  void
  37.123  route_split_rcpts(connect_route *route, GList *rcpt_list, GList **p_rcpt_list, GList **p_non_rcpt_list)
  37.124 @@ -356,9 +361,10 @@
  37.125  			}
  37.126  		}
  37.127  
  37.128 -		/* rewrite return path if there is a table, use that
  37.129 -		   if an address is found and if it has a domain, use that
  37.130 -		 */
  37.131 +		/*
  37.132 +		**  rewrite return path if there is a table, use that
  37.133 +		**  if an address is found and if it has a domain, use that
  37.134 +		*/
  37.135  		if (route->map_return_path_addresses) {
  37.136  			address *ret_path = NULL;
  37.137  			DEBUG(5) debugf("looking up %s in map_return_path_addresses\n", msg->return_path->local_part);
  37.138 @@ -383,11 +389,11 @@
  37.139  	return NULL;
  37.140  }
  37.141  
  37.142 -/* put msgout's is msgout_list into bins (msgout_perhost structs) for each
  37.143 -   host. Used if there is no mail_host.
  37.144 -   route param is not used, we leave it here because that may change.
  37.145 - */
  37.146 -
  37.147 +/*
  37.148 +**  put msgout's is msgout_list into bins (msgout_perhost structs) for each
  37.149 +**  host. Used if there is no mail_host.
  37.150 +**  route param is not used, we leave it here because that may change.
  37.151 +*/
  37.152  GList*
  37.153  route_msgout_list(connect_route *route, GList *msgout_list)
  37.154  {
  37.155 @@ -415,8 +421,13 @@
  37.156  				/* there is already a rcpt for this host */
  37.157  				msg_out *msgout_last = (msg_out *) ((g_list_last(mo_ph->msgout_list))->data);
  37.158  				if (msgout_last->msg == msgout->msg) {
  37.159 -					/* if it is also the same message, it must be the last one appended
  37.160 -					   to mo_ph->msgout_list (since outer loop goes through msgout_list) */
  37.161 +					/*
  37.162 +					**  if it is also the same message,
  37.163 +					**  it must be the last one
  37.164 +					**  appended to mo_ph->msgout_list
  37.165 +					**  (since outer loop goes through
  37.166 +					**  msgout_list)
  37.167 +					*/
  37.168  					msgout_last->rcpt_list = g_list_append(msgout_last->rcpt_list, rcpt);
  37.169  				} else {
  37.170  					/* if not, we append a new msgout */
    38.1 --- a/src/smtp_in.c	Thu Sep 22 15:07:40 2011 +0200
    38.2 +++ b/src/smtp_in.c	Thu Oct 20 10:20:59 2011 +0200
    38.3 @@ -1,32 +1,33 @@
    38.4 -/*  MasqMail
    38.5 -    Copyright (C) 1999-2001 Oliver Kurth
    38.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    38.7 -
    38.8 -    This program is free software; you can redistribute it and/or modify
    38.9 -    it under the terms of the GNU General Public License as published by
   38.10 -    the Free Software Foundation; either version 2 of the License, or
   38.11 -    (at your option) any later version.
   38.12 -
   38.13 -    This program is distributed in the hope that it will be useful,
   38.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   38.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   38.16 -    GNU General Public License for more details.
   38.17 -
   38.18 -    You should have received a copy of the GNU General Public License
   38.19 -    along with this program; if not, write to the Free Software
   38.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   38.21 +/*
   38.22 +**  MasqMail
   38.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   38.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   38.25 +**
   38.26 +**  This program is free software; you can redistribute it and/or modify
   38.27 +**  it under the terms of the GNU General Public License as published by
   38.28 +**  the Free Software Foundation; either version 2 of the License, or
   38.29 +**  (at your option) any later version.
   38.30 +**
   38.31 +**  This program is distributed in the hope that it will be useful,
   38.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   38.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   38.34 +**  GNU General Public License for more details.
   38.35 +**
   38.36 +**  You should have received a copy of the GNU General Public License
   38.37 +**  along with this program; if not, write to the Free Software
   38.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   38.39  */
   38.40  
   38.41  #include "masqmail.h"
   38.42  #include "readsock.h"
   38.43  
   38.44  /*
   38.45 -  I always forget these rfc numbers:
   38.46 -  RFC 821  (SMTP)
   38.47 -  RFC 1869 (ESMTP)
   38.48 -  RFC 1870 (ESMTP SIZE)
   38.49 -  RFC 2197 (ESMTP PIPELINE)
   38.50 -  RFC 2554 (ESMTP AUTH)
   38.51 +**  I always forget these rfc numbers:
   38.52 +**  RFC 821  (SMTP)
   38.53 +**  RFC 1869 (ESMTP)
   38.54 +**  RFC 1870 (ESMTP SIZE)
   38.55 +**  RFC 2197 (ESMTP PIPELINE)
   38.56 +**  RFC 2554 (ESMTP AUTH)
   38.57  */
   38.58  
   38.59  
   38.60 @@ -74,10 +75,11 @@
   38.61  }
   38.62  
   38.63  
   38.64 -/* this is a quick hack: we expect the address to be syntactically correct
   38.65 -   and containing the mailbox only, though we first check for size in
   38.66 -   smtp_in().
   38.67 -   Return false if address is too long.
   38.68 +/*
   38.69 +**  this is a quick hack: we expect the address to be syntactically correct
   38.70 +**  and containing the mailbox only, though we first check for size in
   38.71 +**  smtp_in().
   38.72 +**  Return false if address is too long.
   38.73  */
   38.74  static gboolean
   38.75  get_address(gchar *line, gchar *addr)
    39.1 --- a/src/smtp_out.c	Thu Sep 22 15:07:40 2011 +0200
    39.2 +++ b/src/smtp_out.c	Thu Oct 20 10:20:59 2011 +0200
    39.3 @@ -1,29 +1,30 @@
    39.4 -/* smtp_out.c
    39.5 -    Copyright (C) 1999-2001 Oliver Kurth
    39.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    39.7 -
    39.8 - * This program is free software; you can redistribute it and/or modify
    39.9 - * it under the terms of the GNU General Public License as published by
   39.10 - * the Free Software Foundation; either version 2 of the License, or
   39.11 - * (at your option) any later version.
   39.12 - *
   39.13 - * This program is distributed in the hope that it will be useful,
   39.14 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   39.15 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   39.16 - * GNU General Public License for more details.
   39.17 - *
   39.18 - * You should have received a copy of the GNU General Public License
   39.19 - * along with this program; if not, write to the Free Software
   39.20 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   39.21 - */
   39.22 +/*
   39.23 +**  smtp_out.c
   39.24 +**  Copyright (C) 1999-2001 Oliver Kurth
   39.25 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   39.26 +**
   39.27 +**  This program is free software; you can redistribute it and/or modify
   39.28 +**  it under the terms of the GNU General Public License as published by
   39.29 +**  the Free Software Foundation; either version 2 of the License, or
   39.30 +**  (at your option) any later version.
   39.31 +**
   39.32 +**  This program is distributed in the hope that it will be useful,
   39.33 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   39.34 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   39.35 +**  GNU General Public License for more details.
   39.36 +**
   39.37 +**  You should have received a copy of the GNU General Public License
   39.38 +**  along with this program; if not, write to the Free Software
   39.39 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   39.40 +*/
   39.41  
   39.42  /*
   39.43 -  I always forget these rfc numbers:
   39.44 -  RFC 821  (SMTP)
   39.45 -  RFC 1869 (ESMTP)
   39.46 -  RFC 1870 (ESMTP SIZE)
   39.47 -  RFC 2197 (ESMTP PIPELINE)
   39.48 -  RFC 2554 (ESMTP AUTH)
   39.49 +**  I always forget these rfc numbers:
   39.50 +**  RFC 821  (SMTP)
   39.51 +**  RFC 1869 (ESMTP)
   39.52 +**  RFC 1870 (ESMTP SIZE)
   39.53 +**  RFC 2197 (ESMTP PIPELINE)
   39.54 +**  RFC 2554 (ESMTP AUTH)
   39.55  */
   39.56  
   39.57  #include "masqmail.h"
   39.58 @@ -73,9 +74,12 @@
   39.59  		if (host_entry) {
   39.60  			psb->helo_name = g_strdup(host_entry->h_name);
   39.61  		} else {
   39.62 -			/* we failed to look up our own name. Instead of giving our local hostname,
   39.63 -			   we may give our IP number to show the server that we are at least
   39.64 -			   willing to be honest. For the really picky ones. */
   39.65 +			/*
   39.66 +			**  we failed to look up our own name. Instead of
   39.67 +			**  giving our local hostname, we may give our IP
   39.68 +			**  number to show the server that we are at least
   39.69 +			**  willing to be honest. For the really picky ones.
   39.70 +			*/
   39.71  			DEBUG(5) debugf("failed to look up own host name.\n");
   39.72  			psb->helo_name = g_strdup_printf("[%s]", inet_ntoa(sname.sin_addr));
   39.73  		}
   39.74 @@ -276,20 +280,20 @@
   39.75  }
   39.76  
   39.77  /*
   39.78 -We first try EHLO, but if it fails HELO in a second fall back try.
   39.79 -This is what is requested by RFC 2821 (sec 3.2):
   39.80 -
   39.81 -	Once the server has sent the welcoming message and
   39.82 -	the client has received it, the client normally sends
   39.83 -	the EHLO command to the server, [...]
   39.84 -	For a particular connection attempt, if the server
   39.85 -	returns a "command not recognized" response to EHLO,
   39.86 -	the client SHOULD be able to fall back and send HELO.
   39.87 -
   39.88 -Up to and including version 0.3.0 masqmail used ESMTP only if the
   39.89 -string ``ESMTP'' appeared within the server's greeting message. This
   39.90 -made it impossible to use AUTH with servers that would send odd
   39.91 -greeting messages.
   39.92 +**  We first try EHLO, but if it fails HELO in a second fall back try.
   39.93 +**  This is what is requested by RFC 2821 (sec 3.2):
   39.94 +**
   39.95 +**      Once the server has sent the welcoming message and
   39.96 +**      the client has received it, the client normally sends
   39.97 +**      the EHLO command to the server, [...]
   39.98 +**      For a particular connection attempt, if the server
   39.99 +**      returns a "command not recognized" response to EHLO,
  39.100 +**      the client SHOULD be able to fall back and send HELO.
  39.101 +**
  39.102 +**  Up to and including version 0.3.0 masqmail used ESMTP only if the
  39.103 +**  string ``ESMTP'' appeared within the server's greeting message. This
  39.104 +**  made it impossible to use AUTH with servers that would send odd
  39.105 +**  greeting messages.
  39.106  */
  39.107  static gboolean
  39.108  smtp_helo(smtp_base *psb, gchar *helo)
  39.109 @@ -310,8 +314,10 @@
  39.110  		return FALSE;
  39.111  	}
  39.112  
  39.113 -	/* our guess that server understands EHLO could have been wrong,
  39.114 -	   try again with HELO */
  39.115 +	/*
  39.116 +	**  our guess that server understands EHLO could have been wrong,
  39.117 +	**  try again with HELO
  39.118 +	*/
  39.119  
  39.120  	fprintf(psb->out, "HELO %s\r\n", helo);
  39.121  	fflush(psb->out);
  39.122 @@ -357,13 +363,13 @@
  39.123  static void
  39.124  send_data_line(smtp_base *psb, gchar *data)
  39.125  {
  39.126 -	/* According to RFC 821 each line should be terminated with CRLF.
  39.127 -	   Since a dot on a line itself marks the end of data, each line
  39.128 -	   beginning with a dot is prepended with another dot.
  39.129 -	 */
  39.130 +	/*
  39.131 +	**  According to RFC 821 each line should be terminated with CRLF.
  39.132 +	**  Since a dot on a line itself marks the end of data, each line
  39.133 +	**  beginning with a dot is prepended with another dot.
  39.134 +	*/
  39.135  	gchar *ptr;
  39.136 -	gboolean new_line = TRUE;  /* previous versions assumed that each item was exactly one line.
  39.137 -	                              This is no longer the case */
  39.138 +	gboolean new_line = TRUE;  /* previous versions assumed that each item was exactly one line.  This is no longer the case */
  39.139  
  39.140  	ptr = data;
  39.141  	while (*ptr) {
  39.142 @@ -702,7 +708,8 @@
  39.143  }
  39.144  
  39.145  gint
  39.146 -smtp_out_msg(smtp_base *psb, message *msg, address *return_path, GList *rcpt_list, GList *hdr_list)
  39.147 +smtp_out_msg(smtp_base *psb, message *msg, address *return_path,
  39.148 +		GList *rcpt_list, GList *hdr_list)
  39.149  {
  39.150  	gint i, size;
  39.151  	gboolean ok = TRUE;
  39.152 @@ -732,8 +739,10 @@
  39.153  	}
  39.154  
  39.155  	if (ok) {
  39.156 -		/* pretend the message is a bit larger,
  39.157 -		   just in case the size calculation is buggy */
  39.158 +		/*
  39.159 +		**  pretend the message is a bit larger,
  39.160 +		**  just in case the size calculation is buggy
  39.161 +		*/
  39.162  		smtp_cmd_mailfrom(psb, return_path, psb->use_size ? size+SMTP_SIZE_ADD : 0);
  39.163  
  39.164  		if (!psb->use_pipelining) {
  39.165 @@ -775,8 +784,10 @@
  39.166  			}
  39.167  		}
  39.168  
  39.169 -		/* There is no point in going on if no recp.s were accpted.
  39.170 -		   But we can check that at this point only if not pipelining: */
  39.171 +		/*
  39.172 +		**  There is no point in going on if no recp.s were accpted.
  39.173 +		**  But we can check that at this point only if not pipelining:
  39.174 +		*/
  39.175  		ok = (ok && (psb->use_pipelining || (rcpt_accept > 0)));
  39.176  		if (ok) {
  39.177  
  39.178 @@ -786,17 +797,22 @@
  39.179  			DEBUG(4) debugf("C: DATA\r\n");
  39.180  
  39.181  			if (psb->use_pipelining) {
  39.182 -				/* the first pl'ed command was MAIL FROM
  39.183 -				   the last was DATA, whose response can be handled by the 'normal' code
  39.184 -				   all in between were RCPT TO:
  39.185 -				 */
  39.186 +				/*
  39.187 +				**  the first pl'ed command was MAIL FROM
  39.188 +				**  the last was DATA, whose response can be
  39.189 +				**  handled by the 'normal' code all in
  39.190 +				**  between were RCPT TO:
  39.191 +				*/
  39.192  				/* response to MAIL FROM: */
  39.193  				if ((ok = read_response(psb, SMTP_CMD_TIMEOUT))) {
  39.194  					if ((ok = check_response(psb, FALSE))) {
  39.195  
  39.196 -						/* response(s) to RCPT TO:
  39.197 -						   this is very similar to the sequence above for no pipeline
  39.198 -						 */
  39.199 +						/*
  39.200 +						**  response(s) to RCPT TO:
  39.201 +						**  this is very similar to
  39.202 +						**  the sequence above for no
  39.203 +						**  pipeline
  39.204 +						*/
  39.205  						for (i = 0; i < rcpt_cnt; i++) {
  39.206  							if ((ok = read_response(psb, SMTP_CMD_TIMEOUT))) {
  39.207  								address *rcpt = g_list_nth_data(rcpt_list, i);
  39.208 @@ -804,10 +820,12 @@
  39.209  									rcpt_accept++;
  39.210  									addr_mark_delivered(rcpt);
  39.211  								} else {
  39.212 -									/* if server returned an error 4xx or 5xx for one recp. we
  39.213 -									   may still try the others. But if it is a timeout, eof
  39.214 -									   or unexpected response, it is more serious and we
  39.215 -									   should give up. */
  39.216 +									/*
  39.217 +									** if server returned an error 4xx or 5xx for one recp. we
  39.218 +									**  may still try the others. But if it is a timeout, eof
  39.219 +									**  or unexpected response, it is more serious and we
  39.220 +									**  should give up.
  39.221 +									*/
  39.222  									if ((psb->error != smtp_trylater) &&
  39.223  										(psb->error != smtp_fail)) {
  39.224  										ok = FALSE;
  39.225 @@ -870,9 +888,11 @@
  39.226  				         msg->uid, addr_string(rcpt), psb->remote_host);
  39.227  		}
  39.228  	} else {
  39.229 -		/* if something went wrong,
  39.230 -		   we have to unmark the rcpts prematurely marked as delivered
  39.231 -		   and mark the status */
  39.232 +		/*
  39.233 +		**  if something went wrong,
  39.234 +		**  we have to unmark the rcpts prematurely marked as
  39.235 +		**  delivered and mark the status
  39.236 +		*/
  39.237  		smtp_out_mark_rcpts(psb, rcpt_list);
  39.238  
  39.239  		/* log the failure: */
  39.240 @@ -895,7 +915,8 @@
  39.241  }
  39.242  
  39.243  gint
  39.244 -smtp_deliver(gchar *host, gint port, GList *resolve_list, message *msg, address *return_path, GList *rcpt_list)
  39.245 +smtp_deliver(gchar *host, gint port, GList *resolve_list, message *msg,
  39.246 +		address *return_path, GList *rcpt_list)
  39.247  {
  39.248  	smtp_base *psb;
  39.249  	smtp_error err;
    40.1 --- a/src/smtp_out.h	Thu Sep 22 15:07:40 2011 +0200
    40.2 +++ b/src/smtp_out.h	Thu Oct 20 10:20:59 2011 +0200
    40.3 @@ -1,19 +1,21 @@
    40.4 -/* smtp_out.h, Copyright (C) Oliver Kurth,
    40.5 - *
    40.6 - * This program is free software; you can redistribute it and/or modify
    40.7 - * it under the terms of the GNU General Public License as published by
    40.8 - * the Free Software Foundation; either version 2 of the License, or
    40.9 - * (at your option) any later version.
   40.10 - *
   40.11 - * This program is distributed in the hope that it will be useful,
   40.12 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   40.13 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   40.14 - * GNU General Public License for more details.
   40.15 - *
   40.16 - * You should have received a copy of the GNU General Public License
   40.17 - * along with this program; if not, write to the Free Software
   40.18 - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   40.19 - */
   40.20 +/*
   40.21 +**  smtp_out.h
   40.22 +**  Copyright (C) Oliver Kurth,
   40.23 +**
   40.24 +**  This program is free software; you can redistribute it and/or modify
   40.25 +**  it under the terms of the GNU General Public License as published by
   40.26 +**  the Free Software Foundation; either version 2 of the License, or
   40.27 +**  (at your option) any later version.
   40.28 +**
   40.29 +**  This program is distributed in the hope that it will be useful,
   40.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   40.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   40.32 +**  GNU General Public License for more details.
   40.33 +**
   40.34 +**  You should have received a copy of the GNU General Public License
   40.35 +**  along with this program; if not, write to the Free Software
   40.36 +**  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   40.37 +*/
   40.38  
   40.39  #include <unistd.h>
   40.40  #include <sys/types.h>
    41.1 --- a/src/smtpsend.c	Thu Sep 22 15:07:40 2011 +0200
    41.2 +++ b/src/smtpsend.c	Thu Oct 20 10:20:59 2011 +0200
    41.3 @@ -1,19 +1,20 @@
    41.4 -/*  MasqMail
    41.5 -    Copyright (C) 1999 Oliver Kurth
    41.6 -
    41.7 -    This program is free software; you can redistribute it and/or modify
    41.8 -    it under the terms of the GNU General Public License as published by
    41.9 -    the Free Software Foundation; either version 2 of the License, or
   41.10 -    (at your option) any later version.
   41.11 -
   41.12 -    This program is distributed in the hope that it will be useful,
   41.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   41.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   41.15 -    GNU General Public License for more details.
   41.16 -
   41.17 -    You should have received a copy of the GNU General Public License
   41.18 -    along with this program; if not, write to the Free Software
   41.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   41.20 +/*
   41.21 +**  MasqMail
   41.22 +**  Copyright (C) 1999 Oliver Kurth
   41.23 +**
   41.24 +**  This program is free software; you can redistribute it and/or modify
   41.25 +**  it under the terms of the GNU General Public License as published by
   41.26 +**  the Free Software Foundation; either version 2 of the License, or
   41.27 +**  (at your option) any later version.
   41.28 +**
   41.29 +**  This program is distributed in the hope that it will be useful,
   41.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   41.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   41.32 +**  GNU General Public License for more details.
   41.33 +**
   41.34 +**  You should have received a copy of the GNU General Public License
   41.35 +**  along with this program; if not, write to the Free Software
   41.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   41.37  */
   41.38  
   41.39  #include <stdio.h>
    42.1 --- a/src/spool.c	Thu Sep 22 15:07:40 2011 +0200
    42.2 +++ b/src/spool.c	Thu Oct 20 10:20:59 2011 +0200
    42.3 @@ -1,20 +1,21 @@
    42.4 -/*  MasqMail
    42.5 -    Copyright (C) 1999-2001 Oliver Kurth
    42.6 -    Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
    42.7 -
    42.8 -    This program is free software; you can redistribute it and/or modify
    42.9 -    it under the terms of the GNU General Public License as published by
   42.10 -    the Free Software Foundation; either version 2 of the License, or
   42.11 -    (at your option) any later version.
   42.12 -
   42.13 -    This program is distributed in the hope that it will be useful,
   42.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   42.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   42.16 -    GNU General Public License for more details.
   42.17 -
   42.18 -    You should have received a copy of the GNU General Public License
   42.19 -    along with this program; if not, write to the Free Software
   42.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   42.21 +/*
   42.22 +**  MasqMail
   42.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   42.24 +**  Copyright (C) 2010 markus schnalke <meillo@marmaro.de>
   42.25 +**
   42.26 +**  This program is free software; you can redistribute it and/or modify
   42.27 +**  it under the terms of the GNU General Public License as published by
   42.28 +**  the Free Software Foundation; either version 2 of the License, or
   42.29 +**  (at your option) any later version.
   42.30 +**
   42.31 +**  This program is distributed in the hope that it will be useful,
   42.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   42.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   42.34 +**  GNU General Public License for more details.
   42.35 +**
   42.36 +**  You should have received a copy of the GNU General Public License
   42.37 +**  along with this program; if not, write to the Free Software
   42.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   42.39  */
   42.40  
   42.41  #include <sys/stat.h>
   42.42 @@ -216,8 +217,9 @@
   42.43  	return msg;
   42.44  }
   42.45  
   42.46 -/* write header. uid and gid should already be set to the
   42.47 -   mail ids. Better call spool_write(msg, FALSE).
   42.48 +/*
   42.49 +**  write header. uid and gid should already be set to the
   42.50 +**  mail ids. Better call spool_write(msg, FALSE).
   42.51  */
   42.52  static gboolean
   42.53  spool_write_header(message *msg)
    43.1 --- a/src/tables.c	Thu Sep 22 15:07:40 2011 +0200
    43.2 +++ b/src/tables.c	Thu Oct 20 10:20:59 2011 +0200
    43.3 @@ -1,20 +1,21 @@
    43.4 -/*  MasqMail
    43.5 -    Copyright (C) 1999-2001 Oliver Kurth
    43.6 -    Copyright (C) 2008 markus schnalke <meillo@marmaro.de>
    43.7 -
    43.8 -    This program is free software; you can redistribute it and/or modify
    43.9 -    it under the terms of the GNU General Public License as published by
   43.10 -    the Free Software Foundation; either version 2 of the License, or
   43.11 -    (at your option) any later version.
   43.12 -
   43.13 -    This program is distributed in the hope that it will be useful,
   43.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   43.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   43.16 -    GNU General Public License for more details.
   43.17 -
   43.18 -    You should have received a copy of the GNU General Public License
   43.19 -    along with this program; if not, write to the Free Software
   43.20 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   43.21 +/*
   43.22 +**  MasqMail
   43.23 +**  Copyright (C) 1999-2001 Oliver Kurth
   43.24 +**  Copyright (C) 2008 markus schnalke <meillo@marmaro.de>
   43.25 +**
   43.26 +**  This program is free software; you can redistribute it and/or modify
   43.27 +**  it under the terms of the GNU General Public License as published by
   43.28 +**  the Free Software Foundation; either version 2 of the License, or
   43.29 +**  (at your option) any later version.
   43.30 +**
   43.31 +**  This program is distributed in the hope that it will be useful,
   43.32 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   43.33 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   43.34 +**  GNU General Public License for more details.
   43.35 +**
   43.36 +**  You should have received a copy of the GNU General Public License
   43.37 +**  along with this program; if not, write to the Free Software
   43.38 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   43.39  */
   43.40  
   43.41  #include <fnmatch.h>
   43.42 @@ -72,7 +73,8 @@
   43.43  }
   43.44  
   43.45  gpointer*
   43.46 -table_find_func(GList *table_list, gchar *key, int (*cmp_func) (const char *, const char *))
   43.47 +table_find_func(GList *table_list, gchar *key, int (*cmp_func) (const char *,
   43.48 +		const char *))
   43.49  {
   43.50  	GList *node;
   43.51  
    44.1 --- a/src/timeival.c	Thu Sep 22 15:07:40 2011 +0200
    44.2 +++ b/src/timeival.c	Thu Oct 20 10:20:59 2011 +0200
    44.3 @@ -1,19 +1,20 @@
    44.4 -/*  MasqMail
    44.5 -    Copyright (C) 1999-2002 Oliver Kurth
    44.6 -
    44.7 -    This program is free software; you can redistribute it and/or modify
    44.8 -    it under the terms of the GNU General Public License as published by
    44.9 -    the Free Software Foundation; either version 2 of the License, or
   44.10 -    (at your option) any later version.
   44.11 -
   44.12 -    This program is distributed in the hope that it will be useful,
   44.13 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
   44.14 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   44.15 -    GNU General Public License for more details.
   44.16 -
   44.17 -    You should have received a copy of the GNU General Public License
   44.18 -    along with this program; if not, write to the Free Software
   44.19 -    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   44.20 +/*
   44.21 +**  MasqMail
   44.22 +**  Copyright (C) 1999-2002 Oliver Kurth
   44.23 +**
   44.24 +**  This program is free software; you can redistribute it and/or modify
   44.25 +**  it under the terms of the GNU General Public License as published by
   44.26 +**  the Free Software Foundation; either version 2 of the License, or
   44.27 +**  (at your option) any later version.
   44.28 +**
   44.29 +**  This program is distributed in the hope that it will be useful,
   44.30 +**  but WITHOUT ANY WARRANTY; without even the implied warranty of
   44.31 +**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   44.32 +**  GNU General Public License for more details.
   44.33 +**
   44.34 +**  You should have received a copy of the GNU General Public License
   44.35 +**  along with this program; if not, write to the Free Software
   44.36 +**  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   44.37  */
   44.38  
   44.39  #include <ctype.h>