w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
PHP force transport into PostFix
Take a look at php.ini file /etc/php5/apache2/php.ini on debian: [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = me@example.com Uncomment sendmail_from: and set it to your needs. Make sure you do: service apache2 restart or service httpd restart to change take effect. Hope it helps, Mirko

Categories : PHP

How to handle multiple Ciphers
Do not optimize prematurely. While creating a Cipher instance and initializing it is a relatively expensive operation, test it first. Only after performance testing should you optimize performance. Also note that Cipher is not thread safe (nor is HashMap), in case you wanted to use this cache in multiple threads.

Categories : Java

How to set the list of ciphers and protocols to be used for sockets created by using HttpsURLConnection?
Take the SSLSocketFactory obtained by SSLContext.getSocketFactory() and wrap it in a custom subclass of SSLSocketFactory, which delegates to the one obtained from SSLContext, but in createSocket() also sets the required cipher.

Categories : Java

Use of $ in postfix expression
In this case, I am certain the operator is exponentiation. 8 3 4 + - 3 8 2 / + * 2 $ 3 + is: 8 3 4 + - = 1 3 8 2 / + = 7 1 7 * = 7 7 2 $ = 49 49 3 + = 52. Or maybe 7 2 $ = 128 128 3 + = 131. Depends on how your instructor defined the operator.

Categories : Database

Send mail using php and postfix
PHP runs on the server. onClick executes Javascript on the CLIENT machine. You can NOT directly invoke PHP functions via Javascript code, or vice versa. What you're doing can be accomplished with a simple form: <?php if ($_SERVER["REQUEST_METHOD"] == 'POST') { $to = $_POST['to']; $text = $_POST['text']; mail($to, .....); } ?> <form method="POST" action=""> <input type="text" name="to" /> <input type="text" name="text" /> <input type="submit" /> </form> There is no need to use Javascript at all.

Categories : PHP

Postfix statistics of each user, how do?
Try using postfix-logwatch # Sample Usage perl postfix-logwatch --nosummary --nodetail --limit envelopesenderdomains='2 1:10: 2:8:' /var/log/maillog # Command says Give 2 level output in which give top ten domains in level one( 1:10:) and top 8 users in each domain ie. level two ( 2:8: ) ****** Detail (2) ********************************************************************************** 72488 Envelope sender domains ----------------------------------------------------------------- 14055 intranet.domain1.com 6912 domain1-owner 1203 owner 486 cmowner 370 sysaduser 219 cowner 185 towner 175 autoowner 167 cpanel-owner ... 8867 live.com 8867

Categories : Linux

Postfix with ip address instead domain name
As far as I know there is no way to make postfix send mail to the Internet without FQDN. It can be set up to exchange mail between local users, though, but that's obvoiusly won't help you. The reason behind it is quite simple: vast majority of the mail servers are verifying peer's identity on SMTP connection using reverse DNS lookup. If your IP has no nice DNS name assigned, then your mail is quite likely to be considered a spam. So even you will manage to bypass FQDN requrement your recipients still may not receive your mails. It can be even dangerous, as your IP may get stuck into spam lists after that. I see two options for your here: Wait for the correct domain name to be associated with your IP Or use mailbox on an established public service like gmail or hotmail to send mails from

Categories : PHP

It's possible to read email using ID on Postfix?
Try to grep /var/log/mail.log.1, /var/log/mail.log.2, etc files too. But if the email was not bounced via postfix there are no way to recover it. By default postfix keeps emails in undeliverable state (i.e bounced) within 5 days (parameter maximal_queue_lifetime).

Categories : Email

alias_maps in postfix like GMail does
Postfix and virtualmin both support alias "like" gmail with simple config. Just go to "System Information > Postfix Mail Server > General Options" (http(s)://<yourserver>:<vitualminport>/postfix/general.cgi). Search for "Separator usernames / address extensions" field (press ctl+f and type "address extensions", for quick search) and fill it with "+". Alternatively you can edit /etc/main.cf and place a line like recipient_delimiter = +

Categories : Email

Overloading postfix operator ++
Non-member overloads also use a dummy int parameter to distinguish them: friend void operator++(Number&); // prefix friend void operator++(Number&, int); // postfix Note that some people might expect these to emulate the behaviour of the built-in operator by returning, respectively, the new and old values: Number& operator++(Number& fst) { fst.number=fst.number+1; return fst; // reference to new value } Number operator++(Number& fst, int) { Number old = fst; ++fst; return old; // copy of old value }

Categories : C++

Emails with same domain does not go out from postfix
Check the settings in your /etc/postfix/main.cf file, specifically the setting for virtual_mailbox_domains. If your domain is in this line, but another server is the MX for your domain, then this would explain the problem - i.e. the postfix server thinks it's handling incoming mail for your domain, but the MX records say otherwise.

Categories : Email

operator++ postfix is not declared
If vec1 and vec2 are vectors, they don't have increment operators. They're containers. You need to use iterators to traverse them. Something like: auto it1 = vec1.cbegin(), it2 = vec2.cbegin(); while ( prefix_length < 3 and it1!=vec1.cend() and it2!=vec2.cend() and equal(*it1++, *it2++) ) ++prefix_length;

Categories : C++

Infix to Postfix Converter with parenthesis
Thre are two minor bugs in the code. First, you are skipping the last character in the expression - which, as it turns out, is a right parenthesis: while(infix.length() > 1){ //should be infix.length() > 0 // .... } Second, your code used 'x' as the multiplication operator, while your expression uses '*'.

Categories : Java

(Revised) What's the difference between prefix ++ and postfix ++?
In C++, ++++i compiles, because the prefix operator++ returns an lvalue. However, it is still hardly advisable to use this madness-increment operator, because it invokes UB. I'm a C guy and this is was tagged C as well, so it's worth pointing out that this is different in C, in which case the answer is: No, ++++i isn't permitted either. That's all I've got.

Categories : C++

Whitelist certain email addresses in postfix
Show some logs please. I suspect that you are sending emails via /usr/bin/sendmail or postdrop. Both this commands bypass the smtpd and so the smtpd_recipient_restrictions, as they delivery the locally to the postfix, not via network. If the sent email arrived via network (and so via smtpd) then show the config too (postconf -n) as you may have other configs that are changing the final result for those emails.

Categories : Email

Variables infix to prefix to postfix
I have found a good implementation in the evalmath class provided by Miles Kaufmann here : http://www.phpclasses.org/package/2695-PHP-Safely-evaluate-mathematical-expressions.html Infix to Postfix code : // Convert infix to postfix notation function nfx($expr) { $index = 0; $stack = new EvalMathStack; $output = array(); // postfix form of expression, to be passed to pfx() $expr = trim(strtolower($expr)); $ops = array('+', '-', '*', '/', '^', '_'); $ops_r = array('+'=>0,'-'=>0,'*'=>0,'/'=>0,'^'=>1); // right-associative operator? $ops_p = array('+'=>0,'-'=>0,'*'=>1,'/'=>1,'_'=>1,'^'=>2); // operator precedence $expecting_op = false; // we use this in syntax-checking the expression

Categories : PHP

EC2 Postfix custom email domain
The problem is solved by using the domain name generic mapping. http://www.postfix.org/ADDRESS_REWRITING_README.html#generic The above link describes how to do it. But it is a temporary solution that replaces the lengthy internal domain (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) by mydomain.com for every OUTGOING email. For local email, the system still uses the lengthy internal domain name (ip-xxx-xxx-xx-xxxx.us-west-2.compute.internal) The problem is: postfix seems to have bypassed the $mydomain, $myorigin, $myhost variable I set in the /etc/main.cf file. If anyone can solve it, I will greatly appreciate it. Harry

Categories : Amazon

Mac OS Postfix GMail Relay Configuration
It looks like you have an incomplete or a doubtful hash mark, check your entire file and see if there is a symbol/character before one of the "#" marks. It happened to me, fortunately it was on the first line. Indoor case it looks like its on the bottom of the file, just before when you added the lines for GMAIL relay. Hope it helps

Categories : Osx

Infix to Postfix conversion error
It looks like you're using the Shunting-yard algorithm, but there are a few things you're doing incorrectly. First of all, after the meat of the algorithm runs you still have to print out the remaining contents of the stack and check for mismatched parens. As the wiki article says: When there are no more tokens to read While there are still operator tokens in the stack: If the operator token on the top of the stack is a parenthesis, then there are mismatched parentheses. Pop the operator onto the output queue. This is easy enough to add to your code, just add something like this after the for loop: while(!isempty(&s)) { ch = pop(&s); if(ch == ')' || ch == '(') { printf(" Mismatched parens "); break; } printf("%c",ch); } B

Categories : C

How to evaluate a sign in a postfix expression?
You need to push a different operator. You can tell when parsing the expression whether it's a unary or binary minus, and you need to preserve that in your reverse-Polish notation. So you need a separate operator for unary minus.

Categories : Java

Prefix and postfix operators necessity
POSTFIX and PREFIX are not the same. POSTFIX increments/decrements only after the current statement/instruction is over. Whereas PREFIX increments/decrements and then executes the current step. Example, To run a loop n times, while(n--) { } works perfectly. But, while(--n) { } will run only n-1 times Or for example: x = n--; different then x = --n; (in second form value of x and n will be same). Off-course we can do same thing with binary operator - in multiple steps. Point is suppose if there is only post -- then we have to write x = --n in two steps. There can be other better reasons, But this is one I suppose a benefit to keep both prefix and postfix operator.

Categories : C

Retrieve email from Postfix using Java
Did you find the JavaMail FAQ? There's lots of tips there, including tips on how to debug and what additional information we would need to see to help you figure out what's wrong. So far all you've told us is that something's not working. Without more details, we can't offer more than general suggestions.

Categories : Java

ubuntu 12 postfix smtpd authentication
I deployed postfix the previous week, so I'm new in this area but as I can see in the logs you provided first you get the warning: postfix/smtpd[5728]: warning: hostname spotCUST.spot.net does not resolve to address 93.37.128.33: Name or service not known which means that you have to add 127.0.0.1 spotCUST.spot.net in your /etc/hosts. The next steps are to configure Postfix to use SASL for SMTP AUTH. Make sure that you have installed the modules: sudo apt-get install libsasl2-2 libsasl2-modules Then edit /etc/default/saslauthd in order to activate saslauthd. Remove # in front of START=yes, add the PWDIR, PARAMS, and PIDFILE lines and edit the OPTIONS line at the end: # This needs to be uncommented before saslauthd will be run automatically START=yes PWDIR="/var/spool/postfix/var/run/

Categories : Email

Getting weird expception with Zend_Mail and Postfix
You'll always have an issue if you try to send emails without a recipient address. Postfix is telling you: 8 12:44:59 bv-webserver postfix/sendmail[18647]: fatal: sales@website.com(33): No recipient addresses found in message header Fix that and you should be Ok. You might need to look into why the application apparently lost the email addresses for the seven transactions in question.

Categories : PHP

creating tree from postfix expression
You have a local array of mynode pointers, stored in stack: mynode *temp,*stack[100]; These are all uninitialized. You assign temp->right and temp->left each one of the uninitialized mynode *'s, temp->right=stack[--k]; temp->left=stack[--k]; Then you try to dereference the uninitialized pointer's to get to the data element. //printf("%c %c ",temp->left->data,temp->right->data); That's why your code dies.

Categories : C

Why it the F postfix needed here to avoid an error?
Because floating point numbers are by default of type double. To make it a float you append an F. You are getting error in the below assignment: float f = 3.4028235E38; because a double as more precision than a float. So, there is a possible loss of precision. I would have expected just the opposite as floating point literals are by default double and should be more precise. Let's check the binary representation of your number till double precision: 0x47EFFFFFE54DAFF8 = 01000111 11101111 11111111 11111111 11100101 01001101 10101111 11111000 Now since float is a single precision 32-bit floating point value. It can't store all the double values, which are double precision 64-bit floating point values.

Categories : Java

postfix for loop in perl is not working as expected
The range version of for sets $_ to each element, so in @{$_} you’re trying to dereference $_ as though it were an array reference. These are all equivalent: for my $x (1..10) { print "$x " } for (1..10) { print "$_ " } print "$_ " for (1..10); The easy solution is to create another variable for your array reference: push @{$ref}, 0 for 1 .. $max_size - $curr_size;

Categories : Perl

how to solve the postfix and prefix operator expression?
i++ && j++ is definitely not equivalent to ++i && ++j. Take the case where both are zero - the first results in: 0 && j++ yielding a 0 result (and because of short-circuiting, j won't even get incremented). In the second case, you'll get 1 && 1 yielding a 1 result. With that in mind, let's look at your examples (spaces, semicolons and newlines added for readability): First up: int i = -1; int j = -1; int k = 0; int l = 2; int m = i++ && j++ && k++ || l++; Let's first parenthesize completely to make it easier to deal with: int m = ((i++ && j++) && k++) || l++; So, what's going to happen? First, the i++. i is incremented (and becomes 0), but because it's a post-increment, the expression's result is -1. That

Categories : C

postfix trying to send yahoo addresses to gmail
I believe this was happening because my from address was a non-existant address on my domain, which happened to be hosted by google apps. Since my MTA was setup as a null-client, it wanted to forward the bounce message to the from address. Yahoo was rejecting my email because my SPF record had too many DNS entries in it, which caused the (attempted) bounce message. Strangely, even in debug mode, postfix didn't log anything more than the above line.

Categories : Email

infix to postfix conversion for exponentiation operation
Hope this doesn't sound too pedantic, but I would suggest you to change the whole approach of the algorithm. Since this approach really needs a lot of tunning every time you add a new operator. Even more so, as operators go getting more complicated, your method will become extremely inpractical. I believe a more correct solution, yet that requires a bit more work, is to actually parse your infix expression and build the binary expression tree out of it. This shouldn't be all that hard since grammars for arithmetic expressions are defined all over the internet. After you've found a grammar that suits your needs, perform the parsing, build the tree, and when you have that you can get your postfix notation by performing a post-order traversal of the tree. The Wikipedia article on binary ex

Categories : Algorithm

c++ abstract base class postfix operator
Use the CRTP idiom to make the base class aware of the final class. For example: template<typename T> struct iterator_base { public: T operator++(int) { T temp = static_cast<T&>(*this); ++*this; return temp; } T& operator++() { // ++ mutation goes here return *this; } // ... likewise for --, etc. }; struct iterator1: public iterator_base<iterator1> { // ... custom load function }; This approach is called static polymorphism, and allows you (in some cases) to completely eschew virtual and therefore make your objects smaller. You can omit the load declaration from the base classes and call T::load as static_cast<T&>(*this).load().

Categories : C++

linux postfix config and hostname FQDN
Please refer postfix configuration parameters for more help. myorigin = mydomain.com # The domain name to append when the UNIX user sends out a mail. (For eg. If UNIX user john sends mail, then john@mydomain.com will be the sender address myhostname = mail.mydomain.com # The unique FQDN of your mail server. When talking to other SMTP servers, it identifies itself as mail.mydomain.com mydestination = mydomain.com mail.mydomain.com # You are instructing postfix to receive mails for the domains mydomain.com mail.mydomain.com, whose valid recipients can be specified using local_recipient_maps Can you edit your question and paste the output of postconf -n, that will help to identify the issues

Categories : Linux

How to properly overload postfix increment operator?
You need to return a value (not a reference): A operator++(int) { /*...*/ } this will resolve the compiler warning and you won't end up with a dangling reference.

Categories : C++

PHP + PostFix + Amazon SES + Multiple Domains (transports)
After nearly 24 hours of trying to solve this, I finally figured it out. I hope this helps whomever is looking to use this same method and doesn't have to go through the pain I just went through! So in my example above, domain x + y relayed through virtual aliases. For z we must use a transport, in this case it was a "sender_dependent_relayhost_maps" transport, so I can grab the sender and relay them through amazon SES. In main.cf, regardless of "smtp/unix-socket", we straight up use SES standards: smtp_sasl_auth_enable=yes smtp_sasl_security_options=noanonymous smtp_sasl_password_maps=hash:/etc/postfix/sas smtp_use_tls=yes smtp_tls_security_level=encrypt smtp_tls_note_starttls_offer=yes smtp_tls_CAfile=/etc/ssl/certs/ca-bundle.crt In sender_dependent_relayhost_maps we use: @domainz.c

Categories : Amazon

Postfix Notation calculation program in C, having some problems
printf() format specifier %s requires an argument of character array.but here top is integer so you need to use %d format specifier. Change all printf("%s ", top); ==> printf("%d ", top); ^ ^

Categories : C

Emails not arriving on dovecot/postfix (debian)
Can you please post the output of /var/log/mail.log ? Because as far as i think the mail.log would contain something like "could not connect to /var/run/dovecot/auth-master: permission denied". If this is the case then all you have to do is change the permissions of /var/run/dovecot/auth-master so that vmail user can access it. But there's a catch to it. Whenever dovecot is restarted the permissions are reverted. You will have to give them again or you can write a script that does that for you every time dovecot or system is restarted. If this is not the case then post the log here for more clarification.

Categories : Misc

Problems with stack in an infix to postfix converter
Aha! You need "stack peek" when comparing rank of topmost.. because "top" must be popping the element off. Try stack.peek() or equivalent. What actually class & library are you using, for the stack? s[top] is not valid syntax. Back at answer #1, I started to write a peekRank() function for you, thinking there was an issue with checking when the stack was empty.. but stopped when I saw you had an empty-check. It appears you weren't peek()ing the top correctly, though. [Earlier #2 -- Not the issue] Have you considered the ) handling? Your ( code appears to have a guard for stack-empty on it. [Earlier # 1-- Not exactly the issue] Put an 'ENTIRE EXPRESSION' pseudo-token on the stack for the entire duration of processing, so you have a non-empty stack, or answer a rank des

Categories : Java

Postfix incrementer overloading for nested enumerated types
There are two ways to overload operator++, Card::Suit operator++(int){ } //would be suit++ and Card::Suit& operator++() { } //would be ++suit You must not pass anything to operator++, except a dummy parameter (usually int) and usually you don't pass back a reference in postfix. See here for some information.

Categories : C++

Reference-type return functions and postfix increment
The cause of the error is that post increment x++ returns a temporary value, and this cannot be bound to a non-const lvalue reference. This is a simplified version of the same problem: int i = 42; int& j = i++; // Error: i++ returns temporary value, then increments i. const int& k = i++; // OK, const reference can bind to temporary.

Categories : C++

Use Batch file to rename files and increment postfix
Rather than iterate all possible numbers, it is more efficient to process just the files that exist. I temporarily append .ren to the files as a first step so that I don't have to worry about processing in descending order. This solution assumes that all existing .XLS files that begin with P W or T are to be renamed and follow the correct naming convention. It also assumes the files to be renamed are in the current directory. @echo off setlocal enableDelayedExpansion for %%C in (P T W) do ren %%C*.xls *.*.ren ren ?.xls.ren ?0000.* for %%F in (*.xls.ren) do ( set "num=%%F" set /a "num=1!num:~1,4! - 9999" set "num=000!num!" ren %%F ?!num:~-4!.xls ) Here is a more direct but perhaps less efficient version that safely ignores .XLS files beginning with P T or W that do not meet the

Categories : Batch File



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.